web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Assistance with Galler...
Power Apps
Answered

Assistance with Gallery filters derived from same data

(0) ShareShare
ReportReport
Posted on by 16

Morning All,

 

Small issue, I have a very simple app, a fire register app, with 2 screens with 2 galleries connecting to a sharepoint list.

 

First screen shows users not yet marked as safe, with a flow button to select users and mark as safe. The gallery filter is as follows:

 

Sort(Filter('Site Sign In','Signed Out?'= "No" && 'Marked as safe' = "No"),Created,Ascending)

 

This filter shows correctly, and when someone is marked as safe, and you refresh the screen, the record disappears.

 

On the second screen, for marked as safe, the gallery has the following filter:

 

Sort(Filter('Site Sign In','Signed Out?'= "No" && 'Marked as safe' = "Yes"),Created,Ascending)

 

But for some reason it's showing the exact same data as the first gallery. I feel i'm missing something incredibly simple, but any help would be appreciated.

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Greeny1989 

     

    This is strange! Can you try to refresh the data source once? Also, please share the type of data source and the data type of the 'Marked as Safe' attribute.
     
    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Greeny1989 Profile Picture
    16 on at

    Thanks for the quick reply.

     

    Refreshing the data source clears the item off the first gallery if it's marked as safe, but doesn't update the 2nd gallery.

     

    The data source is a standard sharepoint list, and the Marked as Safe field is a column of Yes/No if that helps.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Greeny1989 

     

    You need to modify your expressions as:
    First Gallery: Sort(Filter('Site Sign In','Signed Out?'= "No" && Text('Marked as safe') = "false"),Created,Ascending)
     
    Second Gallery: Sort(Filter('Site Sign In','Signed Out?'= "No" && Text('Marked as safe') = "true"),Created,Ascending)
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Greeny1989 Profile Picture
    16 on at

    I've just had a go at modifying them, and all it seems to do is clear the gallery completely. It already accepts the value for Yes/No, it just seems to be that the && is confusing it somehow.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Greeny1989 

     

    No, it is not confusing because of &&. The way of filtering a Yes/No type columns is different and this is why you need to filter using the true/false values. Please try out the expression and let me know if they help or we can modify it again based on the error that you get.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Greeny1989 ,

    Could you please share a bit more about the 'Signed Out?' column and 'Marked as safe' column in your SP List? Are they both Yes/No type column?

     

    Based on the formula that you mentioned, I think there is something wrong with it. Actually, it is an known issue with "Yes/No" type of SP List within PowerApps app, the TRUE or FALSE value would not work with the Yes/No type column of the SP list within a Filter function.

     

    Please check my response within the following thread for more details:

    https://powerusers.microsoft.com/t5/General-Discussion/Filter-source-field-true-selects-rows-where-field-is-false/td-p/156553

     

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/Properly-filter-SharePoint-Yes-No-column/idi-p/158375

     

    On your side, please take a try with the following workaround:

    Set the Items proeprty of the Gallery1 (first Gallery) to following:

    Sort(
    Filter('Site Sign In','Signed Out?' = 0 && 'Marked as safe' = 0),
    Created,
    Ascending
    )

    Set the Items proeprty of the Gallery2 (second Gallery) to following:

    Sort(
    Filter('Site Sign In','Signed Out?'= 0 && 'Marked as safe' = 1),
    Created,
    Ascending
    )

    Note: I suppose that the  'Signed Out?' column and 'Marked as safe' column are both Yes/No type column.

     

    In addition, please also take a try with the following workaround:

    Set the OnStart property of the App control to following:

    ClearCollect(
     RecordsCollection,
     'Site Sign In'
    )

    Set the Items proeprty of the Gallery1 (first Gallery) to following:

    Sort(
    Filter(RecordsCollection,'Signed Out?' = false && 'Marked as safe' = false),
    Created,
    Ascending
    )

    Set the Items proeprty of the Gallery2 (second Gallery) to following:

    Sort(
    Filter(RecordsCollection,'Signed Out?'= false && 'Marked as safe' = true),
    Created,
    Ascending
    )

    Add the following formula within the "flow button" (which you used to mark the user as safe) to following:

    ClearCollect(
     RecordsCollection,
     'Site Sign In'
    )

    then re-load your app (fire the OnStart property of the App), then check if the issue is solved.

     

    Best regards,

  • Greeny1989 Profile Picture
    16 on at

    Brilliant, thankyou very much @v-xida-msft , amending the filter to 0/1 as opposed to direct "No"/"Yes" or true/false has worked. I think i got caught out that the first filter accepted this to work, but the 2nd didn't!

     

    I'll bear this in mind for future reference and thanks again for your help.


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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard