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 / Substracting collectio...
Power Apps
Answered

Substracting collections resulting in another collection

(0) ShareShare
ReportReport
Posted on by 28

Hi all,

 

I am struggling with a problem. As I don't know how to filter on two textboxes and two comboboxes, I thought of a workaround creating and subtracting collections. I want to filter the galleries from each phase. When no filter is applied, each bucket/phase (Ideation, Conceptualisation, Realisation and Implementation) should display all records that are applicable to that bucket/phase. However, I also want to filter on:

  1. Responsible (input: textbox)
  2. Innovation name (input: textbox)
  3. Guild (input: combobox)
  4. Chapter (input: combobox)

As you can see from the picture "Intern - button with steps" I want to execute step 2 to step 6. The idea is that each time you create a new collection, the new collection deletes all irrelevant galleryitems and shows the filter applied on the previous along with the filter with this step. Can someone help me with how these collections and filter would look like? I am stuck for days trying to filter the galleries with two comboboxes and two textboxes.

 

I also posted something similar on another post: https://powerusers.microsoft.com/t5/Building-Power-Apps/Filter-two-dropdowns-and-two-textboxes/m-p/1433416 

 

Best,

Yvo 

Intern - button with steps.png
Full screen.png
Categories:
  • WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @YdR ,

    This is a structure guide only, but it would be something like

    Filter(
     YourListName,
     (IsBlank(YourResponsibleTextBox.Text) || Responsible = YourResponsibleTextBox.Text) &&
     (IsBlank(YourInnovationTextBox.Text) || Innovation = YourInnovationTextBox.Text) &&
     (IsBlank(YourGuildComboBox.Selected.Value) || Guild = YourGuildComboBox.Selected.Value) &&
     (IsBlank(YourChapterComboBox.Selected.Value) || Chapter = YourChapterComboBox.Selected.Value)
    )

    Also note .Value may be different depending on the Items of the combo boxes.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • YdR Profile Picture
    28 on at

    Hi @WarrenBelz ,

     

    Thank you for your reply. I tried your formula but it does not work yet:

    Reaction WarrenBelz - filter problem.png

    The error states; incompatible types for comparison. These types cannot be compared: Table, OptionSetValue(Guild choices).

    Do you know what the next step would be? And in addition, how can I show all relevant items for a specific phase when all boxes are empty? For example: for the Conceptualisation phase I want to show all gallery items when all filters are empty. But when I fill in one or more filters, I would like to see those filters applied to the gallery of a specific phase. 

     

    Can you help me with these two problems? 

  • WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    @YdR ,

    It would be very good to state your data source when posting (I am a SharePoint user) -try Guild.Value =   . . . but if that does not work, refer to this document

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • YdR Profile Picture
    28 on at

    Hi @WarrenBelz 

     

    I will upload the data source from now on, thanks for the tip. I am using Dataverse and the table name is "Innovations". 

     

    I couldn't find the solution I was looking for in the document you sent, do you maybe know how to seal the deal here?

     

    Intern - Guild filter not working.pngIntern - Guild combobox items.png

  • YdR Profile Picture
    28 on at

    Hi @WarrenBelz ,

     

    Can you share your wisdom one this one please? 😁

  • WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @YdR ,

    I am not a Dataverse user, but the issue seems to be the data format reference to the Option Set (the sum of my knowledge here is restricted to the document I linked)

  • YdR Profile Picture
    28 on at

    Hi @WarrenBelz ,

     

    Thank you for your time, much appreciated. 

  • Verified answer
    YdR Profile Picture
    28 on at

    Hi @WarrenBelz, and others,

     

    I found the solution for substracting different collections, thereby enabling filtering on two textboxes and two dropdowns, of which one dropdown has a choices data type. 

     

    Step 0 - Clearcollect on all filters

    Step 0 - Clearcollect.PNG

     

    Step 1 + 2 - make collection from the data in the Dataverse table (Table: Innovations)

    Step 1+2 - make collection from the data in the Dataverse table.png

    Step 3 - filter on combobox Guild (data type: choices)

    Step 3 - filter on combobox Guild.PNG

     

    Step 4 - filter on combobox Chapter (data type: choice)

    Step 4 - filter on combobox Chapter (choice).PNG

    Step 5 - filter on responsible (textbox)

    Step 5 - filter on responsible (textbox).PNG

     

    Step 6 + 7 - filter on innovation name (textbox) and create a collection with the endresult

    Step 6 + 7 - filter on name (textbox) and the endresult collection.PNG

     

    Hope this helps anyone facing the same problem. Man this should be made easier in the future.

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard