Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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. 

 

 

 

  • Cwilliams12 Profile Picture
    97 on at
    Re: How to add a Comma to the text Input?

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

  • Cwilliams12 Profile Picture
    97 on at
    Re: How to add a Comma to the text Input?

    @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

     

  • v-bofeng-msft Profile Picture
    on at
    Re: How to add a Comma to the text Input?

    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

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: How to add a Comma to the text Input?

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

  • Cwilliams12 Profile Picture
    97 on at
    Re: How to add a Comma to the text Input?

    @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

     

  • v-bofeng-msft Profile Picture
    on at
    Re: How to add a Comma to the text Input?

    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

     

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard