Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • Prabhakar_S Profile Picture
    735 Super User 2025 Season 1 on at
    Re: The value cannot be converted to a number on mobile

    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.

     

     

  • rwittels Profile Picture
    510 on at
    Re: The value cannot be converted to a number on mobile

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard