cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
keerthanacousik
New Member

Powerapps SortByColumns not working for Lookup and OptionSet column values.

I have a DataTable which is having Lookup and OptionSet columns. when i am trying to sort the columns then there arises an error: "Function sortByColumns has some invalid arguments".Also it is not taking relationship data.Can anyone help me out to solve the problem. 

1 REPLY 1
mdevaney
Super User III
Super User III

@keerthanacousik 
Unfortunately, SORTBYCOLUMNS can only be used on simple data types: text, number, date, boolean, etc.  It cannot be used in cases where the column holds a record: lookup, options set, etc.  You will need to try a strategy like this instead.

 

Sort(Sort(Sort(your_datasource_name, Column1.Value, Ascending), Column2.Value, Ascending), Column3.Value, Ascending)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (36,523)