Hi,
I have a list imported from SP in a Collection. The list comes directly one of our suppliers and can basically not be changed unless I do the job myself which is tedious work. List includes columns with "Text as numbers" by US standards (1.1, 2.2, 3.3 etc.).
This works well when working from a machine with English as the Windows language. Same goes for when running the app on the same computer.
The problem occurs when my colleagues, who are running Norwegian as their Windows language, tries to run the app. All decimal numbers from the collection now returns 'Blank' instead of 1,1 ; 2,2 ; 3,3 (Scandinavians use comma instead of dot when separating decimals).
Is there any way of forcing the App to run with a certain language to avoid this problem? If not, any suggestion on how to update the collections based on the language?
I am looking for something like the below but that can be run over a whole Collection if the language isn't set to en-US.
If (IsMatch(Language(), "nb-NO"),
Substitute(MyText, ".", ",")
)
Thanks!
Solved! Go to Solution.
I am not entirely clear what you mean by "over the entire collection". In general, you don't want to change the values of a datasource to match a language or display. That would be mixing user-interface into your data layer.
The format of numbers is governed by the language of the device running the app. So, when you display a decimal based number, PowerApps will already display as needed for the local language.
I believe your issue is more that your numbers are in Text form as you show a substitute function against the value you want to change.
So, the key in your display of the numbers is to display as a number instead.
i.e. Value(MyText)
Will convert to a number and then display with the regional language.
Also, you can force a language on a number using the Text function.
So - Text(12.34, "#.0#", "NB-no") will display 12,34
I hope this is helpful for you.
Good morning,
So I found a solution for this without changing the lists in SP. The reason why I am reluctant to change the list
is when these should be updated later on. We receive new list at least once a year and I'm not planning on managing that every time.
What @RandyHayes mentioned about having strings that are actually numbers is the main source of the problem here. I would say that the "language barrier" in PowerApps also makes things more complicated, especially when developing for a multilingual team.
My solution here was to create a Component with a function that "translates" the numbers into the correct language. This morning I've tried three different languages and all of them are giving me the same results.
Thumbs up for @RandyHayes that lead me in the right direction.
I am not entirely clear what you mean by "over the entire collection". In general, you don't want to change the values of a datasource to match a language or display. That would be mixing user-interface into your data layer.
The format of numbers is governed by the language of the device running the app. So, when you display a decimal based number, PowerApps will already display as needed for the local language.
I believe your issue is more that your numbers are in Text form as you show a substitute function against the value you want to change.
So, the key in your display of the numbers is to display as a number instead.
i.e. Value(MyText)
Will convert to a number and then display with the regional language.
Also, you can force a language on a number using the Text function.
So - Text(12.34, "#.0#", "NB-no") will display 12,34
I hope this is helpful for you.
Good morning,
So I found a solution for this without changing the lists in SP. The reason why I am reluctant to change the list
is when these should be updated later on. We receive new list at least once a year and I'm not planning on managing that every time.
What @RandyHayes mentioned about having strings that are actually numbers is the main source of the problem here. I would say that the "language barrier" in PowerApps also makes things more complicated, especially when developing for a multilingual team.
My solution here was to create a Component with a function that "translates" the numbers into the correct language. This morning I've tried three different languages and all of them are giving me the same results.
Thumbs up for @RandyHayes that lead me in the right direction.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
203 | |
46 | |
45 | |
45 | |
39 |
User | Count |
---|---|
280 | |
81 | |
81 | |
80 | |
68 |