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 / Power Apps Sort By Col...
Power Apps
Unanswered

Power Apps Sort By Column Error

(0) ShareShare
ReportReport
Posted on by

Hello All,

 

I am trying sort and filter multiple columns in a gallery. I am using the following formula:

 

 

 

SortByColumns(
 Filter(
 colDatabase,
 StartsWith(
 'ID',
 txtID.Text
 ) && (Field1 = drpField1.Selected.Value || IsBlank(drpField1.Selected.Value)) && ("Field2_x002f_Machine" = 'drpFieldMachine2'.Selected.Value || IsBlank('drpFieldMachine2'.Selected.Value)) && (OperationStatus = drpOperationStatus.Selected.Value) && IsBlank(drpOperationStatus.Selected.Value) && (Created >= dteStart.SelectedDate || IsBlank(dteStart.SelectedDate)) && (Created <= dteEnd.SelectedDate || IsBlank(dteEnd.SelectedDate))
 ),
 varSortColumn,
 varSortDirection
)

 

 

 

When I try and use the formula I get an error on column OperationStatus "The specified column ("Column Name") does not exist or is an invalid column type"

 

I had the same issue with column "Field Machine 2" but I resolved this by using the Sharepoint list 'system' name 

 

"Field2_x002f_Machine" 

 

 

I have tried using the system name for "OperationStatus" but this does not help. I have removed and re-added the data source and deleted and re-created the column to no avail.

 

Any help much appreciated 

 

Categories:
I have the same question (0)
  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    Could you show us what kind of Data you have in your Dropbox and what kind of data is in your Column.
    to be sure that you get the data you expect from your Dropbox try putting it into an Text label and see what you get. 

  • AshleyTaylor Profile Picture
    on at

    Thanks for the reply.

     

    In the drop box I have a selection of options in the 'Items' property.

    ["","Option 1","Option 2","Option 3","Option 4"]

    In the Sharepoint list the column is set to single line of text.

     

    Can you elaborate on the putting the dropbox inside a text label?

     

    Thanks

  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    inside the Textlabel text property you can set this formula

    Dropdown1.Selected.Value

    If there is an error it is probabl that the controll returns a table value instead of a string

     

     

  • AshleyTaylor Profile Picture
    on at

    I have just checked as requested and this works as expected 

  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    Can you check the name of the Column again? 
    you can find it inside the URL of the Sharepoint

    Screenshot 2024-03-25 161501.png

    you can find it there under settings.

     

    If that doesn't work can you create a Gallery and a dropdown on a sepparate screen. Add 3 Textlabels into the gallery and use your Datasource as Item in the Gallery. 

    In on Label you put the Column, in the second one Dropdown1.Selected.Value and in the third

    If(TextLabel1.Text=TextLabel2.Text="OK","false")

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard