21-03-22 02:24 PM
Hi community,
I'm from Denmark, I have English language set on and using danish comma for seperating numbers. This means function seperators and number commas will be mixed up.
Take this expression as an example:
Mid([Item Data.CPR], 3, 2) -> Will fail due to comma between numbers understood as decimals.
I solved this by using strings around the numbers to interpret them correctly as numbers and comma being interpret correctly as function seperators.
Mid([Item Data.CPR], "3", "2")
Is there a better way of doing this? I do like my computer on english language (easier to find help for random errors) and I like to use danish decimal seperator (comma).
In advance thanks 🙂
Answered! Go to Answer.
22-03-22 10:49 AM
Mid([Item Data.CPR] , 3 , 2)
22-03-22 10:49 AM
Mid([Item Data.CPR] , 3 , 2)
22-03-22 11:32 AM
22-03-22 01:17 PM
22-03-22 02:24 PM
06-04-22 11:57 AM
06-04-22 12:13 PM
Hi John,
Thanks for looking into this. I think the reason is that both the decimal separator and variable separator are a comma (","). This means BP has a problem as xyz(123,123) can be interpreted as either 1 input with a decimal number or as two inputs with integer numbers. When there are ambiguity it's obviously hard for any program to make a logical decision. The way to make it non-ambiguous was as you said, put in a space, this will show it's not a decimal xyz(123, 123), hence it can only be a separator. This is my guess on this underlying problem 🙂
Hi Robert
If I use data items (variables) there are no problems. This is interpreted correctly.