Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Sorting SharePoint Calculated Column Content in Power App Combo Box

(1) ShareShare
ReportReport
Posted on by 4,547
I am trying to sort the content of a SharePoint calculated column in a Power Apps Combo Box.

If I filter the SP column content it all comes through without issue, but it is not sorted.

When I replace 'Filter' with 'Sort' (see below) I get errors.

It is my understanding that SP calculated columns are not searchable in a Power Apps Combo Box?

Is this true, and does the same restriction apply to the sorting of SP calculated column content in a
Power Apps Combo Box?

What am I missing?

First Attempt:
If(Role_DataCardValue.Text = "Subcontractor",Sort(Staking_Collection,Cost_Type = "Subcontractor" && Title =
     Location_Dropdown.Selected.Value).Billing_Unit_and_Description,SortOrder.Ascending),
 
    If(Role_DataCardValue.Text = "Technician",Sort(Staking_Collection,Cost_Type = "In House" && Title =
     Location_Dropdown.Selected.Value).Billing_Unit_and_Description,SortOrder.Ascending)


Second Attempt:
If(Role_DataCardValue.Text = "Subcontractor",Sort(Staking_Collection,Cost_Type = "Subcontractor" && Title =
     Location_Dropdown.Selected.Value).Billing_Unit_and_Description,SortOrder.Ascending,
 
    If(Role_DataCardValue.Text = "Technician",Sort(Staking_Collection,Cost_Type = "In House" && Title =
     Location_Dropdown.Selected.Value).Billing_Unit_and_Description,SortOrder.Ascending))
Categories:
  • Suggested answer
    Ravindra Jadhav Profile Picture
    Ravindra Jadhav 240 on at
    Sorting SharePoint Calculated Column Content in Power App Combo Box
    In combobox you have less then 2000 item, then you can load that in collection and then sort it will work
     
     
     
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • Verified answer
    Phineas Profile Picture
    Phineas 4,547 on at
    Sorting SharePoint Calculated Column Content in Power App Combo Box
    @FLMike

    Are you confirming my assumption is correct, that the issue is the restrictions on the SP calculated column?

    Also, does this mean the output of an 'AddColumns' is not bound to the restrictions of a calculated column
    in the Power Apps Combo Box, and would allow for sort and/or search of the returned results?
  • Suggested answer
    FLMike Profile Picture
    FLMike 31,580 on at
    Sorting SharePoint Calculated Column Content in Power App Combo Box
    Hi
     
    You are going to get errors. So what you want to do is add a Sort Column into your data. You can do this with AddColumns, and when you do, set the Value = to the output of the Calculated Column, then sort by the new column.
     
     
    Let me know if you have any questions

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard