Hi,
As stated in title, this code
[return "Faktura gjelder for " + moment(dateToday).locale(‘nb’).format(‘MMMM’).toString()]
returned "mai"31.05,“juni” 01.06 and “June” 30.06, “July” 01.07.
Something in Create or something in moment?
Sondre
Hi,
As stated in title, this code
[return "Faktura gjelder for " + moment(dateToday).locale(‘nb’).format(‘MMMM’).toString()]
returned "mai"31.05,“juni” 01.06 and “June” 30.06, “July” 01.07.
Something in Create or something in moment?
Sondre
Hi!
It seems that moment are not releasing new updates very often, so it seems more likely to be something in Create.
I was unable to recreate your exact issue, but I have found an issue with repeated text where the locale requested is ignored and the locale is the same as the line over.
Is it a text component/frontend function or a backend function that is affected in your case? Could you share some more details about the setup, to be able to pinpoint the issue more and forward this as a bug report?
Rhys
Its in a field function, create object action node, in a service. It is isolated to 1 orderLine, so i don’t think its the repeating text
The base date i dateNow->startOfDay
The date attribute is about 3 years old.
It works in app for me with a text component.
Thats all i can think might be useful. Let me know if there is more
Hi!
My comments in combo with some Gemini support:
The issue likely comes from the type of quotes you’re using around 'nb'
and 'MMMM'
. In your code, you’re using curly quotes (‘
and ’
), which can cause the .locale()
and .format()
functions to fail silently or revert to default behavior (usually English).
return "Faktura gjelder for " + moment(dateToday).locale(‘nb’).format(‘MMMM’).toString();
return "Faktura gjelder for " + moment(dateToday).locale('nb').format('MMMM').toString();
We have updated the function evaluator of Services recently. This might be related, i.e. that “incorrect” quote signs were previously accepted.
Sorry, i did not realize the copy paste swapped the signs!
This is the code in function editor:
I tried using the same code in client, and it shows “juli” with the same quotes.
And the function editor shows the curly ones as error
I’m guessing the recent service update as you say then but not for that reason
Hello again,
After some internal testing, we have found that this is a bug which seems limited to the function evaluator in Services. This is likely related to the new function evaluator, as Kristian mentioned.
A challenge has been registered as a regression, and this thread will be updated when the bug is fixed. In the meantime, functions using the same code work as expected in the client, if this can be a temporary workaround.
Thank you for reporting this bug!
Rhys
Would be great if it is out before end of July as that’s when it produces around 7000 invoices The app workaround is not possible in this case.
Hi!
This has been patched to the Dev environments now, meaning, the next deploy from Dev will fix this. Note that this will also be included in tonights release.