web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The value cannot be co...
Power Apps
Unanswered

The value cannot be converted to a number on mobile

(0) ShareShare
ReportReport
Posted on by 510

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:

rwittels_0-1716202468774.png

 

Categories:
I have the same question (0)
  • rwittels Profile Picture
    510 on at

    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.

  • Prabhakar_S Profile Picture
    735 Moderator on at

    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.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard