Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Substituting commas for dots on text entry

Hello, i would like to make a field subsitute "," for "." on text entry, or on submission of the form.
The field is called DataCardValue11
I have tried adding this: Substitute(DataCardValue11.Text,",",".") to the "OnChange" and "OnSelect" of the field and it dosnt work...
I have also tried adding that to the "OnSave" of the SharepointIntegration object, and it dosnt work also.
Nothing ever happens and no errors 🙄

Thank you!

Responsive Resident
Responsive Resident

Hi @ratapof29 

instead of onchange, have you tried keeping it in update property of the datacard


Resolver III
Resolver III

You should create a variable, something like InputText_var and set it to blank to begin, unless it should already have data on startup.


Something like this on the OnVisible property: UpdateContext({InputText_var:""})



Next, use this variable as the Default property of DataCardValue11.


Next, much like you have already tried - in the OnChange property of DataCardValue11 put the following:


UpdateContext({InputText_var: Substitute(DataCardValue11.Text,",",".")})

replying to Krishna_R, nope, it dosnt work either


when i run the app and type for example "123,123" it stays there and dosnt change

i am now trying to do this on a seperate blank app with only one text field, and it still dosnt work


what is the correct way of accomplishing this?

Super User
Super User


Default property of the TextBox:


if you enter Ankit,Patel it will save as Ankit.Patel

Ah, you also need to reset the control for the default to replace the current value. So the OnChange action would be like this:


UpdateContext({InputText_var: Substitute(DataCardValue11.Text,",",".")});


You are doing it on Update property. I did it on default property. Works for me.

Replying to @DylanSimons, i have now done that and it works BUT now when i load the form in edit mode, (to edit an existing item instead of creating one) it is not the right value shown in that field anymore...
how should i correct this?
Thank you!

@zmansuri , i was replying to Krishna_R,

i now tried your solution and it dosnt work. still nothing happens when i enter text in the field and click elsewhere, nothing changes (i have to had Text(...) because the field type is a number. i just want to let users be able to enter either a comma or a dot as decimal separator)


What am i missing?



I tried it on update property. It works.

I entered data as Tes,Test,Test

it saved as Test.Test.Test

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (21,927)