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 / Sort by a column in an...
Power Apps
Answered

Sort by a column in another list

(0) ShareShare
ReportReport
Posted on by 14

Hello,

 

In SharePoint, there are two lists called 'Trainings' and 'Training Participants'. The 'Selected Training Field' in 'Training Participants' is a lookup with trainings. There is also a field called 'Application Type' in 'Training Participants'. I store trainings and training participants in separate collections in Powerapps.

In PowerApps, there is a gallery showing the trainings. Participants can apply through this gallery clicking button.  If a participant has applied, I want to show those trainings at the top of the gallery, but the ones they haven't applied to should be shown below. How can I sort this?

 

This is my filtering items formula: 

 
Filter(colEgitimler,Katalog.Value="Yetkinlik Gelişimi",Kategori in ComboBox2.SelectedItems||IsBlank(ComboBox2.SelectedItems)||IsEmpty(ComboBox2.SelectedItems),Title in ComboBox2_1.Selected.Title||IsBlank(ComboBox2_1.SelectedItems)||IsEmpty(ComboBox2_1.SelectedItems),'Dönem Başlangıç Tarihi'<=Today()&&'Dönem Bitiş Tarihi'>=Today())
 
colEgitimler means Trainings
colEgitimKatilimcilar means Training Participants
 

Could you help me?

Categories:
  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @yagmurpoweruser 

     

    This will help you in the right direction:

    SortByColumns(
     AddColumns(
     Filter(
     colEgitimler,
     Katalog.Value="Yetkinlik Gelişimi",
     Kategori in ComboBox2.SelectedItems || IsBlank(ComboBox2.SelectedItems) || IsEmpty(ComboBox2.SelectedItems),
     Title in ComboBox2_1.Selected.Title || IsBlank(ComboBox2_1.SelectedItems) || IsEmpty(ComboBox2_1.SelectedItems),
     'Dönem Başlangıç Tarihi' <= Today() && 'Dönem Bitiş Tarihi' >= Today()
     ),
     "IsApplied",
     If(
     LookUp(
     colEgitimKatilimcilar,
     'Selected Training Field'.Id = ThisRecord.Id && 'Application Type'.Value = "Applied",
     true
     ),
     1,
     0
     )
     ),
     "IsApplied",
     Descending
    )

     

    By AddColumns we create a new column in your collection IsApplied. Based a that I created a filter to sort on that column.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard