Announcements
I added a complex data type (choise in SharePoint) but I am having issues doing a SortByColumns on this newly added column that is listed in my DataTable. So I wonder if complex data types can be sorted? Thanks for any guidance.
SortByColumn(AddColumn(ListName,"ChoiceColumnNameTxt",ChoiceColumnName.Value),"ChoiceColumnNameTxt",Ascending)
This will create simple text type column dynamically for your complex column. Which will not affect your actual list in anyway. and you can sort it.
@BauwensER3 ,
@zmansuri is correct except for slight misspelling.
SortByColumns( AddColumns( ListName, "ChoiceColumnNameTxt", ChoiceColumnName.Value ), "ChoiceColumnNameTxt" )
You also do not need Ascending as it is inferred (but will work fine).
I point I need to make you aware of is that this in not Delegable and will only results within your (500-2,000) Delegation limit. You might re-think if you actually need the complex field type involved as mostly all of this can be done in Power Apps writing back to Text fields. I have a blog that may interest you on this.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Can you write a blog where you can explain how to implement this? I mean instead of complicated columns use text column in real app.
Thanks
Hi @zmansuri ,
I have not used Lookup columns in many years. You simply base a combo box or a drop-down on the other list you want to look up. A combo box is handy if you want another field in the list. All that is needed then is the Update of the card to be changed to the output of the dropdown (DropdownName.Selected.xxxx)
I have used Text field for LookUp and Person. But, not choice type. Your method would be obviously more elegant, so i thought i can compare.
@zmansuri ,
Choice is even easier unless you want multiple Choices (when you do need a Choice column) - just hard-code the choices in the drop-down as you would in Sharepoint
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 409 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 252 Most Valuable Professional