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 / Gallery filter issues,...
Power Apps
Answered

Gallery filter issues, some items not being filtered correctly.

(0) ShareShare
ReportReport
Posted on by 81

Hi PowerApps Community,

I'm using 2 sets of code to filter 2 galleries to sort a list of tasks depending on "in progress/not started" and "finished", this works fine for most items in my sharepoint list. The issue is sometimes a tasked wich is marked as Not started OR In progress ends up in the "jobioDone" gallery (the one for the items marked as "Finished") I suppose there is a slight oversight in my second filter code but I cannot find it.

Code/gallery 1:

Sort(
 Sort(
 Filter(
 Search(
 AddColumns(
 CollectionAllUnitsJobList;
 "IDcopy";
 Text('Id (ID)')
 );
 txtSearchBox.Text;
 "JOB_SHORT_DESCRIPTION";
 "IDcopy"
 );
 (((User().Email = "example1@biopower.be" || User().Email = "example2@biopower.be") && JOB_WHO.Value = "OPR" && Not(JOB_STATUS.Value = "Finished")) && Not(JOB_Assigned = "Not Assigned") || (User().Email = "example3@biopower.be" && JOB_WHO.Value = "MECH" && Not(JOB_STATUS.Value = "Finished")) || (User().Email = "example4@biopower.be" && JOB_WHO.Value = "HSE" && Not(JOB_STATUS.Value = "Finished")) || ((User().Email <> "example5@biopower.be" || User().Email <> "example6@biopower.be" || User().Email = "example7@biopower.be") && Not(JOB_STATUS.Value = "Finished")) && Not(JOB_Assigned = "Assigned")) 
&& (IsBlank(cboFilterLocationStart.SelectedItems.Value) || IsEmpty(cboFilterLocationStart.SelectedItems.Value) || JOB_LOCATION.Value = cboFilterLocationStart.Selected.Value) && (IsBlank(cboFilterWhoStart.SelectedItems.Value) || IsEmpty(cboFilterWhoStart.SelectedItems.Value) || JOB_WHO.Value = cboFilterWhoStart.Selected.Value) && (IsBlank(cboFilterPrioStart.SelectedItems.Value) || IsEmpty(cboFilterPrioStart.SelectedItems.Value) || JOB_PRIORITY.Value = cboFilterPrioStart.Selected.Value) && (IsBlank(cboFilterPartsStart.SelectedItems.Value) || IsEmpty(cboFilterPartsStart.SelectedItems.Value) || JOB_PARTS_PRESENT.Value = cboFilterPartsStart.Selected.Value)
 );
 "Rijnummer";
 SortOrder.Ascending
 );
 JOB_PRIORITY.Value;
 SortOrder.Ascending
)

Code/gallery 2:

Sort(
 Sort(
 Filter(
 Search(
 AddColumns(
 CollectionAllUnitsJobList;
 "IDcopy";
 Text('Id (ID)')
 );
 txtSearchBoxDone.Text;
 "JOB_SHORT_DESCRIPTION";
 "IDcopy"
 );
(((User().Email = "example1@biopower.be" || User().Email = "example2@biopower.be" ) && JOB_WHO.Value = "OPR" &&(JOB_STATUS.Value = "Finished")) ||
 (User().Email = "example3@biopower.be" && JOB_WHO.Value = "MECH" && JOB_STATUS.Value = "Finished") ||
 (User().Email ="example4@biopower.be" && JOB_WHO.Value = "HSE" && JOB_STATUS.Value = "Finished") ||
 ((User().Email <> "example5@biopower.be" || User().Email <> "example6@biopower.be" || User().Email = "example7@biopower.be" ) && JOB_STATUS.Value = "Finished")) &&
 
 
 
 IsBlank(cboFilterLocationDone.SelectedItems.Value) || IsEmpty(cboFilterLocationDone.SelectedItems.Value) || JOB_LOCATION.Value = cboFilterLocationDone.Selected.Value;
 IsBlank(cboFilterWhoDone.SelectedItems.Value) || IsEmpty(cboFilterWhoDone.SelectedItems.Value) || JOB_WHO.Value = cboFilterWhoDone.Selected.Value;
 IsBlank(cboFilterPrioDone.SelectedItems.Value) || IsEmpty(cboFilterPrioDone.SelectedItems.Value) || JOB_PRIORITY.Value = cboFilterPrioDone.Selected.Value;
 IsBlank(cboFilterPartsDone.SelectedItems.Value) || IsEmpty(cboFilterPartsDone.SelectedItems.Value) || JOB_PARTS_PRESENT.Value = cboFilterPartsDone.Selected.Value
 );
 "Rijnummer";
 SortOrder.Ascending
 );
 JOB_PRIORITY.Value;
 SortOrder.Ascending
)

 

Any idea's?

Kind regards,

 

Sébastien

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @PonceletSeba ,

     

    Do you mean some items with Job Status = "Finished" turn up in Gallery2 than Gallery1? Are they in Gallery1 as well? I also cannot find the reason why items that are not finished turn up in this Gallery,but you may try below formula instead:

    Sort(
     Sort(
     Filter(
     Filter(
     Search(
     AddColumns(
     CollectionAllUnitsJobList;
     "IDcopy";
     Text('Id (ID)')
     );
     txtSearchBoxDone.Text;
     "JOB_SHORT_DESCRIPTION";
     "IDcopy"
     );
    (((User().Email = "example1@biopower.be" || User().Email = "example2@biopower.be" ) && JOB_WHO.Value = "OPR" ) ||
     (User().Email = "example3@biopower.be" && JOB_WHO.Value = "MECH" ) ||
     (User().Email ="example4@biopower.be" && JOB_WHO.Value = "HSE" ) ||
     (User().Email <> "example5@biopower.be" || User().Email <> "example6@biopower.be" || User().Email = "example7@biopower.be" )) &&
     IsBlank(cboFilterLocationDone.SelectedItems.Value) || IsEmpty(cboFilterLocationDone.SelectedItems.Value) || JOB_LOCATION.Value = cboFilterLocationDone.Selected.Value;
     IsBlank(cboFilterWhoDone.SelectedItems.Value) || IsEmpty(cboFilterWhoDone.SelectedItems.Value) || JOB_WHO.Value = cboFilterWhoDone.Selected.Value;
     IsBlank(cboFilterPrioDone.SelectedItems.Value) || IsEmpty(cboFilterPrioDone.SelectedItems.Value) || JOB_PRIORITY.Value = cboFilterPrioDone.Selected.Value;
     IsBlank(cboFilterPartsDone.SelectedItems.Value) || IsEmpty(cboFilterPartsDone.SelectedItems.Value) || JOB_PARTS_PRESENT.Value = cboFilterPartsDone.Selected.Value
     )
     JOB_STATUS.Value = "Finished"
     );
     "Rijnummer";
     SortOrder.Ascending
     );
     JOB_PRIORITY.Value;
     SortOrder.Ascending
    )

     

    Best regards

  • Verified answer
    PonceletSeba Profile Picture
    81 on at

    Hi,

     

    Thanks for your reply,


    I found the error, whilst creating a task (filling out a form and submitting it), I connected the input of a wrong combo box resulting a false value being written to the tasks.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard