Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Unanswered

Named Formula (Record): Issues using named formula Boolean values in a filter function

(0) ShareShare
ReportReport
Posted on by 14

 

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 
testBooleanValue.PNG

 

 

 

 

 

galleryFilterError.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The gallery filters properly with a true

galleryFilterCorrect.png

 

Categories:
  • ShantanuP Profile Picture
    on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    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.

  • andywweaver Profile Picture
    14 on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    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). Screenshot 2023-09-25 121316.png

     

    @Ramspevi @ShantanuP 

  • andywweaver Profile Picture
    14 on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    Oh awesome! Thank you I had not tried using Value()! Much appreciated, do you know if this will be fixed in later updates? @ShantanuP 

  • ShantanuP Profile Picture
    on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    Thanks @Ramspevi . Yes, that's exactly the issue is here. Good guess 🙂

  • Ramspevi Profile Picture
    110 on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    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!

  • ShantanuP Profile Picture
    on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    Here is a workaround that you can use 

     

    Filter(
     DATASOURCE,
     in_ori = Value(testBooleanRecord.in_ori)
    )
  • ShantanuP Profile Picture
    on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    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.

  • ShantanuP Profile Picture
    on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    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
    )

     

  • andywweaver Profile Picture
    14 on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    Step 1

    1. Create a test app
    2. Under settings and upcoming features, turn on Named Formulas.
    3. Add a SharePoint data source with a Boolean column title in_ori and add some records and ensure there are both true and false in_ori values
    4. Under App.Formulas, establish a record using the following named formula:

     

     

    testBooleanRecord = LookUp(
     DATASOURCE,
     ID = 1
     )

     

     

     

    Step 2

    1. Add a gallery with the items set to:

     

    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

    1. Add a toggle to your screen and set the default value to:

     

    testBooleanRecord.in_ori

     

    • Notice the toggle Value defaults properly
    • Now change the gallery's items to:

     

    Filter(
     DATASOURCE,
     in_ori = Toggle.Value
    )

     

    • Notice the gallery filters properly

     

    Step 4

    1. Delete the named formula testBooleanRecord
    2. Set the gallery's items back to:

     

    Filter(
     DATASOURCE,
     in_ori = testBooleanRecord.in_ori
    )

     

    • Add a button with the OnSelect set to the following and press the button:

     

     

    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

  • ShantanuP Profile Picture
    on at
    Re: Named Formula (Record): Issues using named formula Boolean values in a filter function

    I am unable to repro the issue as well. Can you please share which Studio version that you are using?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399

Featured topics