web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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:
I have the same question (0)
  • Verified answer
    SpongYe Profile Picture
    5,616 Super User 2025 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard