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 / Help with filters for ...
Power Apps
Answered

Help with filters for a sharepoint based application in power apps

(0) ShareShare
ReportReport
Posted on by 21

I have generated an application in power apps starting from a sharepoint list with multiple columns, in the initial grid of the application I have the following code, where the values of my columns are shown based on the selected:

 

SortByColumns(

    Filter(

        [@ListaSoporte];

        StartsWith(

            Empresa;

            TextSearchBox1.Text

        )

    );

    "ID";

    If(

        SortDescending1;

        SortOrder.Descending;

        SortOrder.Ascending

    )

)

The problem comes when I want to add another parameter to this filter so that it only shows the results whose value in a Choice column is equal to (Process).

 

Im triying with this code: 

 

SortByColumns(
    Filter(
        Filter(
            [@ListaSoporte];
            StartsWith(
                Empresa;
                TextSearchBox1.Text
            )
        );
        Estado.Value="Proceso"
    );
    "ID";
    If(
        SortDescending1;
        SortOrder.Descending;
        SortOrder.Ascending
    )
)

And it does not show errors but it does not return data, I would like to make this code as simple as possible.

 

Any help or suggestions on how I can do with the code?

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @BMERP ,

     

    I think the below is what you're trying to do? You do not need to nest the Filter function.

     

    SortByColumns(
     Filter(
     ListaSoporte;
     StartsWith(
     Empresa;
     TextSearchBox1.Text
     );
     Estado.Value="Proceso"
     );
     "ID";
     If(
     SortDescending1;
     SortOrder.Descending;
     SortOrder.Ascending
     )
    )
    

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • BMERP Profile Picture
    21 on at

    Tried with that code but nothing, its not returning any data.

     

    Screenshot_20230820-124055_Brave.jpg

    Algo when i try with some other codes im getting the error "cant compare diferent types Record/Text"

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @BMERP - as I understand it, you do not receive any errors with the expression I provided, and the problem only occurs when you include the "Estado" field as an additional parameter in your Filter.

     

    Could you confirm the Estado is a single choice field, and share a screenshot of your table if possible.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

     

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @BMERP - I am glad my suggested solution solved the problem, but it would be worth clarifying why it was not working for you the first time. This will help other community users who may experience the same problem.

  • BMERP Profile Picture
    21 on at

    The code you provided was fine, the error was in my sharepoint list because it was missing refreshing the values of the choice column.... all the values were in the "Solved" state, that's why it was not showing any data.

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard