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 / Get Multiple Filter an...
Power Apps
Answered

Get Multiple Filter and dropdown inserted in Gallery

(0) ShareShare
ReportReport
Posted on by 36

Hi Everyone,

 

I am using this formula on my gallery to filter and sort the data of two columns, RoStatus and Technician.

 

SortByColumns(If(sortAll,Filter(RepairOrderTables,ROStatus = Dropdown.Selected.Value && Site = site.InventSiteId && (If(techAll,Technician = Dropdown1.SelectedText.Value,Site = site.InventSiteId))),Filter(RepairOrderTables,Site = site.InventSiteId && (If(techAll,Technician = Dropdown1.SelectedText.Value,Site = site.InventSiteId)))),"RepairOrderDate",If(SortDescending1,Ascending,Descending),"RepairOrder",Descending)

 

Now I have another column as Status Date and Order Date where I need to filter,sort .

 

Filter(RepairOrderTables,RepairOrderDate = Dropdown2.Selected.Result) -this I have used the formula .

 

Where I Can put it in the main formula as it is showing syntax error.

 

Need immediate help

 

Categories:
  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @jasirqadri123 ,

    Try the structure below - note that I cannot see your data types, so am assuming your references and underlying logic are correct.

    SortByColumns(
     Filter(
     RepairOrderTables,
     (
     !sortAll ||
     ROStatus = Dropdown.Selected.Value
     ) && 
     Site = site.InventSiteId && 
     (
     techAll ||
     Technician = Dropdown1.SelectedText.Value
     ) &&
     RepairOrderDate = Dropdown2.Selected.Result
     ),
     "RepairOrderDate",
     If(
     SortDescending1,
     Ascending,
     Descending
     ),
     "RepairOrder",
     Descending
    )

     

    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

  • Jasir Qadri Profile Picture
    36 on at

    This structure is not neither filtering nor sorting.

     

    I need to sort and filter both Order Date and Status Date Coloumns.

     

    How to do that

  • Jasir Qadri Profile Picture
    36 on at

    For Dropdown ,ROStatus:

    Onchange: If(Dropdown.SelectedText.Value = "ALL",Set(sortAll,false),Set(sortAll,true))

    Items: ["ALL","New","Received"]

    Default: "ALL"

     

    For dropdown: Technician:

    OnSelect: ClearCollect(Tech,Distinct(RepairOrderTables,Technician));Collect(Tech,{Result:"ALL"});

    OnChange: If(Dropdown1.SelectedText.Value = "ALL",Set(techAll,false),Set(techAll,true))

    Items: Tech

    Default: techAll

     

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

    @jasirqadri123 ,

    I can assure you it is doing both (Filtering and Sorting) - not sure how you arrived at that opinion.

    I am a little unclear on your logic, but it is Filtering on ROStatus if your Variable SortAll is true and by Technician if the Variable TechAll is false (which it appears you wanted in your original posted code)

  • Jasir Qadri Profile Picture
    36 on at

    How can i then filter and sort the columns for orderdate and status date 

  • Jasir Qadri Profile Picture
    36 on at

    Can you give the correct formula to implement as I have tried so many times but it is not working

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

    @jasirqadri123 ,

    "Not working" does not help me - the code I posted is my best interpretation of your post requirements with the information you had currently provided. It is valid syntax and assumes the values you posted (I cannot see your data or app structure) are valid. Are you getting errors (if so what) or if not working, what is the issue?

    You have also stated now you have another drop-down setting the variable - can you please state which drop-down names are ROStatus and Technician.

  • Jasir Qadri Profile Picture
    36 on at

    The structure you provided is not showing any error instead the records in gallery are wind off ,when i put your formula on gallery(items). Yes I have two dropdowns, RoStatus and technician in my gallery.

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

    @jasirqadri123 ,

    I cannot see your data, app or read your mind here and the short responses are not helping. What are the actual control names of these drop downs (so I can understand what references belong to them) and also can you please provide a short explanation of the desired result and what controls are relevant to getting this.

  • Jasir Qadri Profile Picture
    36 on at

    I have to implement filter, with dropdown for four columns, i.e, ROStatus,Technician,OrderDate and Status Date.

     

    Above formula is for filtering (ROstatus and technician) and sorting for Orderdate and RepairOrder.

     

    Only pending columns is orderdate and statusdate for which i have filter on my gallery records.

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard