I'm trying to set SortColumn on a lookup column on my gallery item. State is the name of the lookup entity.
Solved! Go to Solution.
Hi @saturation ,
Have you taken a try with the solution I provided above?
Currently, within PowerApps, you could not specify Complex type column (e.g. LookUp, Choice, ... etc) as Sort column within the SortByColumns function.
As an alternative solution, I think the Sort function could achieve your needs. In addition, you could not specify variable as Sort column within the Sort function.
Please consider take a try with above Sort function I provided, then check if the issue is solved:
Sort(
Filter(
'MyData',
....
),
If( // choose different Sort formula based on the SortField variable value
SortField = "State",
State.'Primary Name', // 'Primary Column' represents the child property under the State LookUp field
SortField = "Column1",
Column1,
....
)
,
If(
SortDescending,
SortOrder.Ascending,
SortOrder.Descending
)
)
Best regards,
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
191 | |
70 | |
50 | |
38 | |
28 |
User | Count |
---|---|
243 | |
114 | |
91 | |
91 | |
71 |