I have a weird Power App problem that I have never encountered before, and I am really struggling to find the root cause of it. I have done some troubleshooting and in the simplest form the problem is this:
I have a calculated field in SharePoint. The value in the field is a number and I need to do some comparisons against it in the app. But since it's a calculated field, Power App doesn't understand it's a number unless I put Value() around it.
All good, right? Well. No.
Half of my users see the value in the app. Half of them don't. They all use the app via Chrome browser and have the same user rights to the SharePoint list.
If I use ThisItem.field, all users see the value in the app but I get errors because it's not a number.
If I use Value(ThisItem.field), no errors but half of the users don't see the value at all.
What am I missing here? I was hoping this problem would resolve itself but it's been a month now and time is running out. Either I solve this problem or take the time to build the functionality in a completely different way.
Solved! Go to Solution.
The feature in the app that this problem is affecting is not a label, it's a progress bar that is based on a slider and some of the colors and icons change depending on the slider value. I used the labels only for troubleshooting, figuring out what I see differently than the users with the problem. I used the sliders there as well.
I think this remains a mystery, since I had to create a workaround. I just do the calculation directly in the app instead of SharePoint. Everything else works like a charm, it just needed, you know, a value that actually exists 😅
Unsure about this as we did not get this issue when using it this way.
A quick thing we can think of is, do some calculation on PowerApps side that doesn't change the number.
For example, divide the number by 1 e.g. Value(ThisItem.field/1) and see if this helps in any way.
It's the weirdest thing really. I have tried to find something in common with the users that don't see the value, but there is nothing. It's not completely random either since it only affects certain users, and it affects them every time. And the rest of the group always see the value.
But I try this dividing in my next round of troubleshooting. I'm not awfully positive though.
Okay, the result from the troubleshoot round #83748378743
They can see a number if I use Value(ThisItem.field/1). However, the number is always zero and that is incorrect.
The value in the calculated field is always a number between 0 and 6. So the only possible values are 0, 1, 2, 3, 4, 5 and 6.
ThisItem.field shows the value in the app as 1.00000000000000 (etc)
Value(ThisItem.field) shows the value as 1. (etc)
And while zero is a possible value in the field, items with the value of zero are not shown in the app.
Here are some visuals:
This is what I see in the app, both values are visible.
Here is a screenshot provided by a user who is affected by this problem. There is nothing to see.
And obviously short number is Value(ThisItem.field) and the long number is ThisItem.field. Just made it more friendly to the poor user who has to help me troubleshoot this.
Wow, not sure why affect some users and not others,
The affected users can try clear cache and cookies, but unsure this will help.
Can try this workaround as well, but really unsure why you have the issue, you should not have it:
However, we think above should not be needed!
You can also try arbitrarily rounding the calculated value to see if for some reason it helps in your specific case:
Further details about Round functions:
The Round, RoundDown, and RoundUp functions round a number to the specified number of decimal places:
If you pass a single number, the return value is the rounded version of that number. If you pass a single-column table that contains numbers, the return value is a single-column table of rounded numbers. If you have a multi-column table, you can shape it into a single-column table, as working with tables describes.
Round( Number, DecimalPlaces )
RoundDown( Number, DecimalPlaces )
RoundUp( Number, DecimalPlaces )
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.
Featuring samples like Return to the Workplace and Emergency Response Applications
Features releasing from October 2020 through March 2021