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 / sort,Filter and Search...
Power Apps
Answered

sort,Filter and Search by ID

(0) ShareShare
ReportReport
Posted on by 341

Hi

 

I cant seem to sort, filter and search by ID. I keep on receiving an error message.

 

SortByColumns(Search(Filter('Stationery Master',Text(ID)=TextInput2_1.Text),Text(ID)=TextInput2_2.Text),"ID",If(SortDescending1,Descending,Ascending))

 

Thank you

Categories:
  • Verified answer
    flugaoveltem Profile Picture
    217 on at

    Hi @MiteshGovan 

     

    You don't need the Search bit, try this way: 

     

    Sort(Filter('Stationery Master',ID=TextInput2_1.Text),ID,If(SortDescending1,Descending,Ascending))

     

    In the last If SortDescending1 I think you need to evaluate .value, but it depends on the type of control.

  • MiteshGovan Profile Picture
    341 on at

    Hi

     

    What do i do below?

     

    In the last If SortDescending1 I think you need to evaluate .value, but it depends on the type of control

  • Verified answer
    flugaoveltem Profile Picture
    217 on at

    You can choose to hard code de order like this: 

    Sort(Filter('Stationery Master',ID=TextInput2_1.Text),ID,Ascending)

    or if you want your users to chosse the display order, add a dropdown controle with two options Ascending and Desceding.

    Captura de tela 2020-12-09 141026.png

    and use Selected.value on the sort function: 

     

    Sort(Filter(Person,ID=TextInput1.Text),ID,If(Dropdown1.Selected.Value="Ascending",Ascending,Descending))

  • MiteshGovan Profile Picture
    341 on at

    How do I add other columns and text input? At the moment there is only one column and one textinput.

     

    Sort(Filter('Stationery Master',ID=TextInput2_1.Text),ID,If(SortDescending1,Descending,Ascending))

     

  • MiteshGovan Profile Picture
    341 on at

    Hi 

     

    I receive an error message below when i add another text column.

    Sort(Filter('Stationery Master',ID=TextInput_order.Text),ID,Department=TextInput2_2.Text,"Department",If(SortDescending1,Descending,Ascending))

  • Verified answer
    flugaoveltem Profile Picture
    217 on at

    you should incert every filter options inside Filter fuction.

     

    Sort(Filter(Person,ID=TextInput1.Text&&Departament=TextInput2),ID,If(Dropdown1.Selected.Value="Ascending",Ascending,Descending))

  • MiteshGovan Profile Picture
    341 on at

    Thank you

  • MiteshGovan Profile Picture
    341 on at

    Hi

     

    How do i put a sort on the below?

     

    Sort(If(Dropdown_Current.Selected.Value = "All",'Stationery Master',Filter('Stationery Master',FormStatus=Dropdown_Current.Selected.Value),Descending,Ascending)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard