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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Editable Form DataCard...
Power Apps
Answered

Editable Form DataCard as number with comma seperator

(0) ShareShare
ReportReport
Posted on by 228

Hi Everyone,

 

I have an editable form where the user is supposed to input numeric data on a DataCard.

 

For example if the user inputs 50000 the data is displayed in the DataCard as 50000 instead of the desired 50,000.

 

Is there a way to tell the PowerApp to treat the input as a number with the comma format?

 

Thank you all

 

Milky

 

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @milky_bar_may 

    The best way to deal with this is to change the Text Input format to Number.  It will prevent the user from inputting any commas or other text characters.

     

    textinput6.png

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • milky_bar_may Profile Picture
    228 on at

    Hi @mdevaney 

     

    Thanks for the response.

     

    I have the editable datacard formatted as a number.

     

    However, when the input is entered it doesn't automatically pick up to format with the comma seperator. 

     

    For example, if I input 5000 it stays at 5000 but does not change to 5,000 which is ideally what I would like to see. 

     

    Thanks

     

    Milky

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @milky_bar_may 

    The functionality to pre-format numbers inside a text input does not currently exist for PowerApps.  Suggest you go submit a new idea here.

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

     

    However, you can format numbers in a label like this similar to Excel.

    Text(123456.789,"#,##0.00")

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @milky_bar_may 

     

    There is no direct way to set the format of the typed inputs. As a workaround to this, you can set the configuration as either of the solutions below:

    a) If you want the commas to appear when the user select/change the input. Basically on the OnSelect and OnChange property of the text input (OnChange gets triggered when the user clicks out of the control).
    Default: MyInput
    OnChange: Set(MyInput,Text(Value(TextInput2.Text),"[$-en-US]###,###,###"));Reset(TextInput2)
    OnSelect: Set(MyInput,Text(Value(TextInput2.Text),"[$-en-US]###,###,###"));Reset(TextInput2)

    Here, TextInput2 is the name of the control.

    b) To automatically change this as soon as the input is entered.
    You need to create a timer control as:
    Timer:
    OnTimerStart: Set(MyInput,Text(Value(TextInput2.Text),"[$-en-US]###,###,###"));Reset(TextInput2)
    Repeat: true
    Auto-Start: true
    Duration: 100 (every 1/10 of a second)
    Visible: false

    TextInput: Default -> MyInput

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • mdevaney Profile Picture
    29,989 Moderator on at

    @yashag2255 

    Interesting ideas you have for workarounds there.  I wish there was some other way than looping with a timer that never stops though.  Does having this timer looping constantly impact performance in any significant way?

  • milky_bar_may Profile Picture
    228 on at

    Wow! Big thanks @mdevaney and @yashag2255 

     

    I really appreciate both your inputs and great ideas

  • JMK7 Profile Picture
    2 on at

    Hi Everyone,

    To format number data card/Input with powerapp form this worked for me ,

    Set(
    FormattedNum,
    Text(
    Value(DataCardValue48.Text),
    "[$-en-US]#,###"
    )
    );
    add this to the onchange of the data card and set default value of the data card to FormattedNum.

    Replace DataCardValue48 with your own datacard name.

    Got this solution from Dhruvin Shah on Youtube,cheers to him

  • Joooooly Profile Picture
    2 on at

    Thanks for this, it has helped me to format my number field using a comma after clicking out of the field.  However, when I use the same string in my Edit form it removes the existing entry after saving, can you help with this please?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard