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 / Saving Formatted Number
Power Apps
Answered

Saving Formatted Number

(1) ShareShare
ReportReport
Posted on by 100

I have formatted a number field in PowerApps using TEXT() function.

Formatted Field looks like "123,234,234.00 K EUR"

Now, i want to save this as "123234234.00" (Number) in SharePoint List

Need directions to achieve this 

Categories:
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @Garry030424 ,

    you can change a Text to Number by using Value(...)

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Garry030424 ,

     

    Please try this.

     

    You need to set custom number format in SP list firstly.

    vmengmlimsft_0-1719815539117.png

     

    Then extract number in "123,234,234.00 K EUR" and update it to number column.

    Value(First(Split( "123,234,234.00 K EUR","K EUR")).Value)
    Patch(List,First(List),{NumberColumn:Value(First(Split( "123,234,234.00 K EUR","K EUR")).Value)})

     

     

    Best regards,

    Rimmon

  • Garry030424 Profile Picture
    100 on at

    This gives error saying that it cannot be converted to a number

     

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @Garry030424 ,

    The conversion would be

    Value(
     First(
     Split(
     YourText,
     " "
     )
     ).Value
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Garry030424 Profile Picture
    100 on at

    @WarrenBelz , @v-mengmli-msft :

    Solution Seems to work however i found certain things:

     

    Below input gets stored:

    123,,123.23k EUR --> Gets Converted into 123123.23

    123,123.23 -> Gets stored as is

     

    Below input doesn't work:

    123,123.23k EU

    1,23,123.23k EUR

    1,23,,123.23k EUR

     

    I was checking various scenarios while testing and found these cases

    How can we manage this situation where user leaves certain portion of the standard text post the number or adds extra comma ?

    also , can there be any more such issues someone can encounter ? 

     

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @Garry030424 ,

    To remove the commas

    Value(
     Substitute(
     First(
     Split(
     YourText,
     " "
     )
     ).Value,
     ",",
     ""
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Garry030424 Profile Picture
    100 on at

     

    @WarrenBelz : Throws Error while submitting, says cannot convert to number

     

    Lets say if i input: 123 or 123.11 then it submits

    however if i input: 123.00k EUR or something then it throws error

     

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @Garry030424 ,

    try this one:

    // Assume your formatted text is in a variable or text input named TextInput1
    
    // Step 1: Remove commas and non-numeric characters
    CleanedText = Substitute(Substitute(Substitute(TextInput1.Text, ",", ""), " K EUR", ""), " ", "")
    
    // Step 2: Convert to a number
    NumericValue = Value(CleanedText)
    
    // Step 3: Save to SharePoint
    Patch(
     YourSharePointList,
     Defaults(YourSharePointList),
     {
     NumberField: NumericValue
     }
    )
  • Garry030424 Profile Picture
    100 on at

    @anandm08 : Doesn't solve generic typos example if users types something like 123,123.23K EU where "R" is missing at the end

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at
    // Define a function to extract numeric parts
    ExtractNumeric = Concat(
     ForAll(
     Mid(TextInput1.Text, Sequence(Len(TextInput1.Text)), 1),
     If(
     IsNumeric(Value(ThisRecord.Value)) || ThisRecord.Value = ".",
     ThisRecord.Value,
     ""
     )
     ),
     Value
    )
    
    // Convert the extracted numeric string to a number
    NumericValue = Value(ExtractNumeric)
    
    // Save to SharePoint
    Patch(
     YourSharePointList,
     Defaults(YourSharePointList),
     {
     NumberField: NumericValue
     }
    )
    1. ExtractNumeric: This variable iterates over each character of the input text, checking if it's a digit or a decimal point, and concatenates those valid characters into a new string.
    2. NumericValue: Converts the concatenated numeric string to a number.
    3. Patch: Saves the numeric value to the SharePoint list.

    This approach ensures that even if the user makes typos or includes unexpected characters, the numeric part of the input is correctly extracted and saved to SharePoint.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard