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 / How to add a Comma to ...
Power Apps
Unanswered

How to add a Comma to the text Input?

(0) ShareShare
ReportReport
Posted on by 97

How do you add a comma within a text input field? When the user enters numeric values, I'm needing the values to be formatted with commas.  Also, the form is tied to the gallery where each item will have a different value. I'm needing each item for each of the numeric entry text inputs fields to have commas. (i.e. - "Policy Maximum" )

 

I also have an additional question regarding formatting. How can have a text input only showcase the number as it was entered? I'm only needing numeric values. I'm needing this field to accept a comma to differentiate each item entered (i.e. - "#######,#######,#######,########") "Claim #". 

 

My data source is from a excel document. 

 

 

 

I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Cwilliams12 ,

     

    You could translate the text into the specified format by this foruml:

    I assume the text to be translated is "dsadg124235243623467345758dfg"

    With(
     {TempText:Match("dsadg124235243623467345758dfg","\d+").FullMatch},
     Concat(ForAll(
     Sequence(Len(TempText),1,1),
     If(
     Mod(Value,7)=0 && Value<>Len(TempText),
     Mid(TempText,Value,1) & ",",
     Mid(TempText,Value,1)
     )
     ),Value)
    )

    vbofengmsft_0-1708651986826.png

     

    Best Regards,

    Bof

     

     

  • Cwilliams12 Profile Picture
    97 on at

    @v-bofeng-msft Thank you for the response. Maybe I'm not understanding fully.  The Text input I'm referencing does not have a Text property.  Here is an example of before and after I put click save when entering in number  values within the text input. How can I get the text input to accept the values i entered instead morphing into something else? @Amik 

    Cwilliams12_1-1708961723246.png

     

    Cwilliams12_0-1708961605810.png

     

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Cwilliams12 - I would suggest waiting for @v-bofeng-msft to respond.

  • v-bofeng-msft Profile Picture
    on at

    Hi @Cwilliams12 ,

     

    Please try:

    1\Set the textinput control's OnChange property to:

    If("E" in Self.Text,Set(DefaultValue,With(
     {TempText:Text(Value(Self.Text))},
     Concat(ForAll(
     Sequence(Len(TempText),1,1),
     If(
     Mod(Value,7)=0 && Value<>Len(TempText),
     Mid(TempText,Value,1) & ",",
     Mid(TempText,Value,1)
     )
     ),Value)
    ));Reset(Self));

     2\Set the textinput control's Default property to:

    DefaultValue

     

    Best Regards,

    Bof

  • Cwilliams12 Profile Picture
    97 on at

    @v-bofeng-msft Thank you for your response. Now that I used that code you gave me, the claim number is missing from all of the records including the form I submitted. Also, the format is off in excel. I provided a before and after of the form when entering in the values and after I submit the form. 

     

    Cwilliams12_0-1709045565917.pngCwilliams12_1-1709045583090.png

    Cwilliams12_3-1709045677512.png

     

  • Cwilliams12 Profile Picture
    97 on at

    @v-bofeng-msft We found a solution as we'll ask the end users to just replace the comma with semicolon 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard