Hi. I have an issue with the concat expression that i can't understand. The error message i get is: "Unable to process template language expressions in action 'Set_formatmask_med_prefiks_og_suffiks' inputs at line '1' and column '16384': 'The template language function 'formatNumber' expects its third parameter to be a string which indicates the locale for locale-specific formatting. The provided value is of type 'Null'"
Is has worked fine before but i had to move my SP lists from one site to another. I have built a new flow from scratch and new lists from scratch to eliminate any issues there. This is what i have: 1 SP list wich gives me the ability to administer ID numbers to my Main SP list and also an app. That list "ID management" have only a few columns and one row. Columns; CurrentIDnumber, Prefiks, Suffiks, FormatMask, ID. The ID column is the default SP ID#. The currentIDnumber will increase + 1 of whatever value that is there. The Prefiks is text (xxx) and also the suffiks is text. By using this i can give my SP list a unique ID that i can administer as needed. E. g displayed as "XXX00012.
The flow use a couple of variables and a couple of sharepoint connectors to generate the ID from ID management list to my main list. It fails in the variable that use the concat expression which ties prefiks+formatmask+suffiks togheter. Suddenly i get this error and i cant figure it out. Any ideas is appreciated.
Thanks but that code was not accepted on my end. Could it be something regarding EU og US code language..? Either way, i did find a woraround that is sufficient for now. Thank you for replying and trying to find a solution. Much appreciated 😊
I did find a "woraround" that solved my problem. I dropped the local statement from the concat and then it went through. I am not using the suffix value in my ID set up so thats ok. Still dont know why is failed. Her is my expression that worked:
concat(outputs('Hent_ID_informasjon')?['body/Prefiks'],formatNumber(variables('InitNyttNr'),outputs('Hent_ID_informasjon')?['body/FormatMask']))
I didn't read that the error is related to the FormatNumber function. As it says, you have a null value for the locale parameter. You could use this expression where in the FormatNumber:
FormatNumber(variables('InitNyttNr'),outputs('Hent_ID_informasjon')?['body/FormatMask'],coalesce(outputs('Hent_ID_informasjon')?['body/Suffiks']),'en-US'))
which basically checks if the Suffiks value is null, and it it is, the format number will use 'en-US' locale.
Hope it helps!
Ferran
Hi and thank you for the reply. I copied the expression but i am afraid it was not valid. My expression is accepted but there seems to be something on string 3 which is an issue i have not had before. Other than updating the business Win version to latest there is really nothing new.
Hi @lejo_69
I think you forgot a ")" after some elements. Your expression should look like this:
concat(outputs('Hent_ID_informasjon')?['body/Prefiks']),formatNumber(variables('InitNyttNr')),outputs('Hent_ID_informasjon')?['body/FormatMask']),outputs('Hent_ID_informasjon')?['body/Suffiks']))
Hope it helps!
Ferran
And, sorry. The concat expression is:
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2