cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bbsin
Post Prodigy
Post Prodigy

how to .. pending.. approved.. send.. sort.. button?? how to in the gallery.. thx

hi

 

Can I know how to set the buttons onto to sort by it's status selected and the gallery to display all item by on the latest not selected or is all?? thx

 

 

bbsin_0-1623749185557.png

 

 

My gallery item is Filter(list', 'Created By'.Email=User().Email)

it should only display the user who lock in to see their own records .  Thanks.

 

 

bbsin_1-1623749323187.png

 

 

7 REPLIES 7
zmansuri
Community Champion
Community Champion

Gallery code:

SortByColums(Filter(list', 'Created By'.Email=User().Email),varSort,
If(
SortDescending1,
Descending,
Ascending
)

)

On your button's OnClick Event:

UpdateContext({varSort :"ColumName"});
UpdateContext({SortDescending1:!SortDescending1});

 

That way if it's in ascending it will be set to descending and vice versa.  

bbsin
Post Prodigy
Post Prodigy

Hi @zmansuri 

 

Thanks , but did I missed something??? 

bbsin_0-1623750892334.png

 

zmansuri
Community Champion
Community Champion

You have to set values for varSort and SortDescending1 through OnClik on buttons. and if they are choice or any complex type field you can not sort it directly, You have to use AddColumns. in the gallery code.

@zmansuri 

 

Not too sure .. I just want to sort by ID.  will it work??

 

zmansuri
Community Champion
Community Champion

SortByColums(Filter(list', 'Created By'.Email=User().Email),ID,Ascending)

@zmansuri 

 

Thanks but it's not working

@zmansuri 

 

Did I miss something??

bbsin_0-1623807910280.png

 

bbsin_1-1623807974573.png

 

The status column choice are

bbsin_2-1623808025853.png

 

 

Thanks

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,266)