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 / Using SortByColumns an...
Power Apps
Answered

Using SortByColumns and Filter on a table broke my subsequent table.selected references in forms

(0) ShareShare
ReportReport
Posted on by 6

I have a table that users choose their item and then it opens a new screen drilling into the details. This works just fine, but then all of the Forms in lower level Screens no longer accept the table.Selected as the item that it is referencing and instead shows "no data"

 

SortByColumns(

AddColumns(

Filter (

Table,
txt_SearchList.Text in P1Request_ReportName
, ReportStatus in drop_StatusLookup.SelectedItems
,BP_Impact in drop_BPImpact.SelectedItems
),

"SortValue" , Priority.Value

),

"SortValue" , SortOrder.Ascending )

 

Without the Sort added, the filter works just fine and all the Forms function with Table.Selected. As soon as I add the Sort function it stops working. I am rather confused.

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @MatSeppanen ,

     

    Instead of referencing the Gallery.Selected property, try using it in a LookUp function to replace any references, for instance:

     

    LookUp(Table, ID = Gallery.Selected.ID)

     

  • MatSeppanen Profile Picture
    6 on at

    wow... yep that did it thank you!

  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @MatSeppanen ,

     

    Usually it's the AddColumns function in the Items property of the gallery that causes this. Since this function changes the schema of the record, it is no longer recognised when Gallery.Selected is referenced. Using the LookUp function retrieves the record directly from the data source again, which has the original schema.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard