cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ishtiaq_zamil
Frequent Visitor

how to sort the gallary in powerapps

Hi Makers,

I have a sharepoint list on global level it should sort the gallary by year

Then it should arrange the gallary meetings vertically. as shown below(our target is to achive like this).

1.jpg

This is my sharepoint list

2.jpg

 

 

 

 

 

 

9 REPLIES 9
PG_WorXz10
Community Champion
Community Champion

Hi @Ishtiaq_zamil ,

 

May I ask you if you have any year field in your Sharepoint list ? 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

yes there is a year field, name as "contDate"

PG_WorXz10
Community Champion
Community Champion

Hi @Ishtiaq_zamil ,

 

Ok, on select of dropdown Year set the a variable with the selected year. Is it ok for you to filter the gallery based on the selected year because for sorting only ascending and Descending are possible.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Ramole
Super User
Super User

@Ishtiaq_zamil 

Here is a video Todd Baginski explaining  how to Filtering and sorting galleries https://www.youtube.com/watch?v=jb--wPX10bc 

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.
RandyHayes
Super User
Super User

@Ishtiaq_zamil 

Are you really trying to sort the gallery or filter the gallery?  You have a dropdown with different years in it - that would usually imply that you want to filter the list.

 

If Filtering is what you need, then you can simply set your Gallery Items formula to be:

Filter(<yourExistingItemsFormulaHere>,
    contDate = yourDropdown.Selected.Value
)

 

I am not sure how the dropdown would play into the sorting, but if it is just sorting you want, then the following should give you that sorting:

Sort(<yourExistingItemsFormulaHere>,
    contDate
)

If you have multiple levels of sorting needed, then you can use the SortByColumns function for that. 

SortByColumns(<yourExistingItemsFormulaHere>,
    "Title", Ascending,
    "contDate", Ascending
)

 

However, in looking at what you have for the final outcome, you really need some level of grouping based on your list data.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi RandyHayes,

Yes i am really looking for the filtering of my sharepoint list data. i want to filter it as i shown in the first image.

how can i achieve it? i am unable to write a formula for that filter.

 

RandyHayes
Super User
Super User

@Ishtiaq_zamil 

Did you try the formulas I provided?  What is the current Items property of your gallery?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

Yes I tried it but i am unable to write the formula for the gallary filter. my current formula in items property is 

 

Filter(DataOfUpload,
    contDate = DDYear.Selected.Value
)

 

the above formula shows all the records as below

 

 

Ishtiaq_zamil_0-1629358247705.png

 

let me show  you more info for this app, the first gallary of companies is like this.

Ishtiaq_zamil_1-1629358406281.png

there will be multiple meetings conducted by the board on these companies, whenever the meeting is completed for the perticualr company they will upload 2 files one for Minutes of Meeting and another one Material.

in the total there will be 5 meetings in one year for each company.

 

can you please help me to write the formula for filetering of these sharepoint list items.

if you want i have share you the app.

Ishtiaq_zamil
Frequent Visitor

@RandyHayes can you please assist me.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,695)