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.
@v-bofeng-msft We found a solution as we'll ask the end users to just replace the comma with semicolon
@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.
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 - I would suggest waiting for @v-bofeng-msft to respond.
@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
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)
)
Best Regards,
Bof
WarrenBelz
87
Most Valuable Professional
mmbr1606
71
Super User 2025 Season 1
Michael E. Gernaey
65
Super User 2025 Season 1