web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter only works with...
Power Apps
Unanswered

Filter only works with Title or ID

(0) ShareShare
ReportReport
Posted on by 37

Hi, I'm new and have following problem:

 

From MS Lists (SharePoint Lists) I created an App.

The Sort-Function works fine with Title or ID.

 

SortByColumns(Filter([@Sponsoren_2023]; StartsWith(Referent.DisplayName; TextSearchBox1.Text)); "Title"; If(SortDescending1; SortOrder.Descending; SortOrder.Ascending))

 

wachi_0-1683224243156.png

 

When I use another Column it doesn't work:

wachi_1-1683224325185.png

SortByColumns(Filter([@Sponsoren_2023]; StartsWith(Referent.DisplayName; TextSearchBox1.Text)); "Referent_Vorjahr"; If(SortDescending1; SortOrder.Descending; SortOrder.Ascending))

 

wachi_2-1683224470865.png

So please help 🙂

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @wachi,

     

    The function will look as follows:

    SortByColumns(
     Filter(
     [@Sponsoren_2023]; 
     StartsWith(Referent.DisplayName; TextSearchBox1.Text) || StartsWith(Referent_Vorjahr; TextSearchBox1.Text)
     );
     If(SortDescending1; SortOrder.Descending; SortOrder.Ascending)
    )

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • wachi Profile Picture
    37 on at

    Hi LaurensM

    wachi_0-1683260602261.png

    Unfortunately, it doesn't work. I get the message: The specified column ascending does not exist or represents an invalid type for a sort column. However, it is a text column in MS List. Somehow the connection to the SharePoint list does not work correctly.

    wachi_1-1683260682227.png

     

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @wachi ,

    There is a missing part inside the formula, the name of the column base of sorting.

    SortByColumns(
     Filter(
     [@Sponsoren_2023]; 
     StartsWith(Referent.DisplayName; TextSearchBox1.Text) || StartsWith(Referent_Vorjahr; TextSearchBox1.Text)
     );
     "Referent_Vorjahr";
     If(SortDescending1; SortOrder.Descending; SortOrder.Ascending)
    )

    Hope it helps !

  • LaurensM Profile Picture
    12,516 Moderator on at

    The SortByColumns parameter somehow vanished in my code snippet, thx for adjusting the code @gabibalaban😊

  • wachi Profile Picture
    37 on at

    Hi gabibalabn, 

    Unfortunately, this solution doesn't work either. I think it's because of the SharePoint list, can that be?

     

    "Referent_Vorjahr" = This formula contains an error. Check the formula and run again.

     

    SortByColumns(
    Filter(
    [@Sponsoren_2023];
    StartsWith(Referent.DisplayName; TextSearchBox1.Text) || StartsWith(Referent_Vorjahr; TextSearchBox1.Text)
    );
    "Referent_Vorjahr";
    If(SortDescending1; SortOrder.Descending; SortOrder.Ascending)
    )

    wachi_1-1683307713234.png

     

    wachi_0-1683307587456.png

     

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @wachi ,

    In sharepoint, go to list settings and edit Referent_vorjahr column. The link address will show you at the end the internal name of the column. Use it inside the provided formula.

  • wachi Profile Picture
    37 on at

    Do you mean the Name? It ist the same.

    wachi_0-1683694034018.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard