cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shimauk
Helper I
Helper I

App used in multiple countries ( decimal separators )

Hi ,

 

I'm building an app that is going to be used both in France and UK.

In france they use comma as decimal separators and in Uk we use full stops. 

My issue is that if french user inputs a value in a text field with comma and I use a flow or patch function to patch it to the database , the db will rewrite the number as it is coming in UK format. e.g. French user inputs 2,45 and Db stores 245.

There is a language tag in value function Value(Textinput.Text,"fr-FR") but that doesnt help as this only works if you're inputing full stops in france or commas in the UK which will never be the case.

 

Thank you for your help,

Peter

8 REPLIES 8
v-monli-msft
Community Support
Community Support

Hi @shimauk,

 

Have you tried to use the below formula on the Patch function?

 

Value(TextInput1.Text,Language())

 

 

If this does not work, then you might want to use the workaround:

 

If(Language()="fr-FR",Substitute(TextInput1.Text, ",", "." ),TextInput1.Text)

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-monli-msft

 

Thank you,

 

the workaround works. Unfortunately it opens an entirely new array of issues 😄

 

I'm now able to upload correct format from both france and uk. The issue now is that when I subsequently collect data from source table i'm not able to use the data for any calculations ( when using french language ) as it cant sum up 16.5 + 20 ( only 16,5 + 20 ). 

I tried something like Substitute(Collection.Column,".",",") but that didnt do anything.

 

Cheers,

Peter

CarlosFigueira
Power Apps
Power Apps

Which connector are you using that has this problem? We have a bug with CDS that has this symptom (decimal separator being ignored for locales where the separator is ',') - and this bug should be fixed by next week.

 

I was able to reproduce this issue with CDS, but with SQL Server and SharePoint I'm not seeing it.

Just to update this thread - I tried the same scenario yesterday, and it worked. Please let us know if this is not the case.

alex216
Frequent Visitor

Hi, have you ever resolved this issue? I am facing a similar problem with users using a comma or a point as a decimal sign with unpredictable results.

I am also having similar issue. My formula as below 

If(Value(TextInput1.Text,"en-US")>0,"$"&Text(Value(TextInput1.Text,"en-US"),"[$-en-US] ###,##0.00"),"$" &Text(0,"[$-en-US] ###,##0.00"))

@CarlosFigueira are you referring to same issue or it is different?

Fabiodicaro
Frequent Visitor

Is there already a solution for this problem? I'm stuck with the same problem.

Fabiodicaro
Frequent Visitor

For now I solved it with this code

 

Substitute(TextInput1.Text;".";",")

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,845)