testBoolean = LookUp(
ToolboxUsers,
email = User().Email
)
testBoolean is a named formula. It is a record from a data source. It has a Boolean value called:
testBoolean.in_ori
The named formula is used in a gallery with the items below
Filter(
ToolboxUsers,
in_ori = testBoolean.in_ori
)
PowerApps recognizes that testBoolean.in_ori is Boolean and it = true (see photo)
testBoolean is a record from the data source ToolboxUsers, so in_ori is found in both and both contain Boolean values. However when the gallery is filtering using testBoolean.in_ori it does not filter properly.
When you change the filtering from:
//THIS
Filter(
ToolboxUsers,
in_ori = testBoolean.in_ori
)
//TO THIS
Filter(
ToolboxUsers,
in_ori = true
)
The gallery does not filter properly using testBoolean.in_ori even though PowerApps recognizes that testBoolean.in_ori is Boolean and it = true
The gallery filters properly with a true
Yes, you will still see the warning. But at runtime, the filter should work. We have opened an issue with the investigating team and soon this should be fixed.
Sorry, I actually tried the formula and it does not compare properly. Power Apps still recognizes the boolean column as boolean and doesn't like Value(user.in_ori).
Oh awesome! Thank you I had not tried using Value()! Much appreciated, do you know if this will be fixed in later updates? @ShantanuP
Thanks @Ramspevi . Yes, that's exactly the issue is here. Good guess 🙂
Ohh wow.
Blame on me or us for not reconizing this. It is not like thats THE first and best known hurdle in the conquest of mastering the sharepoint request API.... Boolean Columns aren't true / false they are 1/0.
Seems like the parsing/interpreting of SP boolean values in PowerApps is inconsistent? Just a guess of a PowerFX / PowerApps enthusiast. Anyhow congratulations on the huge milestone of PowerFX 1.0 going GA!
Here is a workaround that you can use
Filter(
DATASOURCE,
in_ori = Value(testBooleanRecord.in_ori)
)
It looks like a bug but not in named formula as you can see above expression without using named formula also exhibits the same behavior. I will follow up with the team to get this fixed. Thank you for reporting it.
Does following work for you? This one doesn't have any named formula in it.
Filter(
DATASOURCE,
in_ori = Lookup(DATASOURCE, SP = 1).in_ori
)
Step 1
testBooleanRecord = LookUp(
DATASOURCE,
ID = 1
)
Step 2
Filter(
DATASOURCE,
in_ori = testBooleanRecord.in_ori
)
The gallery will not filter the data properly when you are filtering the data with a record from the same data source if that record is stored as a named formula.
Step 3
testBooleanRecord.in_ori
Filter(
DATASOURCE,
in_ori = Toggle.Value
)
Step 4
Filter(
DATASOURCE,
in_ori = testBooleanRecord.in_ori
)
Set(
testBooleanRecord,
LookUp(
DATASOURCE,
ID = 1
)
)
The gallery now filters properly.
A Boolean value in a record from a SharePoint Data source when the record is stored as a named formula, is not properly interpreted when the Boolean value is used to filter the same data source that the record came from.
@ShantanuP @Ramspevi Power apps build version is 3.23091.14
I am unable to repro the issue as well. Can you please share which Studio version that you are using?
Stay up to date on forum activity by subscribing.
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399