Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

MULTI COLUMN GALLERY SORT & FILTER FUNCTION

(0) ShareShare
ReportReport
Posted on by 517

Hello,

Can you help. I have a muliti column gallery. I wanted to have a dynamic sort icon for my columns. 

 

 

 

jaina_0-1667547575294.png

Here's the Item property of my gallery.

jaina_1-1667547641824.png

 

Now, i created a global variable below for varSortColumn and varSortDirection in OnStart property of the App.

 

jaina_2-1667547692030.png

 

Then, I have an Icon for Reference_No column. I set the OnSelect Property to:

jaina_3-1667547775281.png

 

Then, i update the Item property of my gallery to:

jaina_4-1667547851540.png

 

 

Now, the items in my gallery is not displaying. 

 

jaina_5-1667547894805.png

 

What could be the reason why items are not displaying? Appreciate your time to check and resolve this concern. 🙂 

 

  • WarrenBelz Profile Picture
    WarrenBelz 144,609 on at
    Re: MULTI COLUMN GALLERY SORT & FILTER FUNCTION

    Hi @jaina ,

    That is because variables in the Sort are not Delegable (you will see a warning on your code). Firstly, set the Default of SearchInput_1 to "" (empty string) and try this

    With(
     {
     wList:
     Filter(
     'CAPEX - PH',
     StartsWith(
     Reference_No,
     SearchInput_1.Text
     ) && 
     (
     Len(drp_ApprovalStatus.Selected.Value) = 0 ||
     drp_ApprovalStatus.Selected.Value = "All" ||
     Approval_Status = drp_ApprovalStatus.Selected.Value 
     )
     )
     },
     SortByColumns(
     wList,
     varSortColumn,
     varSortDirection
     )
    )

    Also be aware that the output of the top filter needs to return record numbers under your Delegation limit.

     

    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

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard