cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Formula Autocorrect based on en-AU location is creating an error

I am trying to enter a text formula to put a dollar sign in front of a numeric value Text(ThisItem.Price, "$ ##.00") but the system must recognise that I am in Australia and keeps autocorrecting it to Text(ThisItem.Price, "[$-en-AU]$ ##.00") which then gives me an error "Language code 'en-AU' not supported'. If I delete the [$-en-AU] the system keeps putting it back. Would you believe this is part of the PowerApp Learn tutorial - unit 3 of 5. Not looking forward to setting up a Date field or Distance Mesurement.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Formula Autocorrect based on en-AU location is creating an error

Hi @APD_Karl ,

If you use Text function within app to format a Number to a currency type value, the Language tag within the Text function would be converted into local language tag automatically.

 

Based on the needs that you mentioned, I afraid that there is no way to achieve your needs in PowerApps currently.

 

In addition, there is no way to turn off the Autocorrect mechanism within the Text function in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

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

View solution in original post

8 REPLIES 8
Community Support
Community Support

Re: Formula Autocorrect based on en-AU location is creating an error

Hi @APD_Karl ,

Currently, the "Language code 'en-AU' is not supported within the Text function in PowerApps. When you run your app in Australia, the Language tag within yourText(...) formula within your app would be converted into the local language tag automatically.

More details about the available Language code supported within PowerApps, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-language#language-ta...

 

If you want the Text(...) formula to recognize that you are in Australia and keeps autocorrecting it into a correct value when you run your app in Australia, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, please consider take a try with the following formula:

Set the Text property of the Label to following formula:

If(
   Right(Language(), 2) = "US",
   "$ " & Round(ThisItem.Price, 2),     /* <-- Display as US Currency Symbol e.g. $ 1200.45 */
Right(Language(), 2) = "AU",
"A$ " & Round(ThisItem.Price, 2) /* <-- Display as Australia Currency Symbol e.g. A$ 1200.45 */ )

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Formula Autocorrect based on en-AU location is creating an error

Is this new formula all I place in the formula bar (I just get a blank feild when I do). Or does it go before / after the original formula "Text(ThisItem.Price, "$ ##.00")" (That didn't work either), Or does it go somewhere within the original formula?

 

I don't even need it to say A$, just $ would be fine. I only want to progress to the next stage of the PowerApps Learning Module.

 

What would be smart is if I could turn off Autocorrect while we wait for Microsoft to realise there is a whole world outside the USA.

Highlighted
Community Support
Community Support

Re: Formula Autocorrect based on en-AU location is creating an error

Hi @APD_Karl ,

If you use Text function within app to format a Number to a currency type value, the Language tag within the Text function would be converted into local language tag automatically.

 

Based on the needs that you mentioned, I afraid that there is no way to achieve your needs in PowerApps currently.

 

In addition, there is no way to turn off the Autocorrect mechanism within the Text function in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

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

View solution in original post

Highlighted
Frequent Visitor

Re: Formula Autocorrect based on en-AU location is creating an error

I worked around this issue by updating the autofill language code to en-US and then formatting the date as I wanted to.

Highlighted
Advocate II
Advocate II

Re: Formula Autocorrect based on en-AU location is creating an error


@v-xida-msft wrote:

I afraid that there is no way to achieve your needs in PowerApps currently.

 

In addition, there is no way to turn off the Autocorrect mechanism within the Text function in PowerApps currently.

Boooo!!

Highlighted
Regular Visitor

Re: Formula Autocorrect based on en-AU location is creating an error

There is a work around... If you put the exact text you want (for me it was "dd/mm/yyyy hh:mm AM/PM") into a label (label12), then just call on that label eg.

User().FullName &" "& Text( Now(),Label12.Text ). Call on the label rather than putting the text directly into the field.

eg. for you Text(ThisItem.Price, "$ ##.00") is replaced with Text(ThisItem.Price, Label1.Text) and Label1 has a Text value of "$ ##.00"

 

 

Highlighted
Regular Visitor

Re: Formula Autocorrect based on en-AU location is creating an error

This worked really well. I used it to format a start and end date to use Australian date format. 

 

Thanks!

Highlighted
Regular Visitor

Re: Formula Autocorrect based on en-AU location is creating an error

Strangely, it also seems to work if you just remove the -AU.

From: Text('Start Time',"[$-en-AU]HH:mm - dddd, d mmmm, yyyy")

To: Text('Start Time',"[$-en]HH:mm - dddd, d mmmm, yyyy")

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,487)