Hi. This works perfectly on desktop but not on mobile. Please assist.
I have a SharePoint list with a Longitude and a Latitude column. They are both Number format.
I am getting current location from a map component.
I am patching the location using these formulas:
field_1: Value(Text(Substitute(Location.Latitude,",","."),"0.00000")),
field_2: Value(Text(Substitute(Location.Longitude,",","."),"0.00000"))
On mobile, I get this error when patching:
Hi @rwittels ,
The error you're encountering on mobile devices may be due to regional settings or locale differences between the desktop and mobile environments. These differences can affect how numbers are interpreted, particularly when it comes to decimal separators. On mobile devices, the decimal separator might be interpreted differently (e.g., using a comma instead of a period).
To ensure consistency and avoid regional settings issues, you can use the 'Text' function with the 'InvariantLanguage' option, which ensures that the number formatting is consistent regardless of the device's locale.
Use the 'Text' function with 'InvariantLanguage' for consistent formatting:
- For 'field_1' (Latitude):
field_1: Value(Text(Location.Latitude, "[$-en-US]0.00000"))
- For 'field_2' (Longitude):
field_2: Value(Text(Location.Longitude, "[$-en-US]0.00000"))
This ensures that the latitude is converted to a text string with a period as the decimal separator, formatted to 5 decimal places, using US number formatting. By using the '[$-en-US]' locale code, you force the 'Text' function to use the period as the decimal separator, which should be recognized correctly by the 'Value' function regardless of the device's locale settings.
Thanks!!!
Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.
I tried to patch just the Location.Latitude and Location.Longitude and it works. I had an issue a while ago where I had to replace commas in the values with points but that doesn't seem to be happening anymore.
I would appreciate some input here anyway.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473