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 / Second screen filter
Power Apps
Answered

Second screen filter

(0) ShareShare
ReportReport
Posted on by 68

Hi everyone,

 

I have a sharepoint list in wich I have data of expensives. I need my app to do these:

1. The main screen with all expenses submitted (main screen1):

Anotação 2020-05-04 114208.png

Example: The user needs filter expensives per Center Cost.

On screen 1 there is a button that goes to screen 2 (Filters).

 

2. Also I want a second screen with a where users can filter the screen 1.

Anotação 2020-05-04 114242.png

Anotação 2020-05-04 114304.png

I define the local variable and I filter my table sharepoint with this variable, but it is not working that way.

 

Thank you.

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @iagosalvadori 

    Put this code in the OnVisible property of your screen

    Set(I_CC; "");;
    Set(I_CC; Blank());;

     

    Then put this code in the OnSelect property of your filter button

    Set(I_CC; TextInput1.Text)

     

    Finally, put this code in the Items property of your gallery

    Filter(Despesas; I_CC = Blank() Or 'Centro de Custo' = I_CC)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • iagosalvadori Profile Picture
    68 on at

    Hi @mdevaney ,

     

    I put in my screen 1 the code:

     Anotação 2020-05-04 123452.png

    And put this code in the OnSelect property of your filter button (screen 2):

    Anotação 2020-05-04 125309.png

    I put this code in the Items property of your gallery:

    Anotação 2020-05-04 125437.png

    But when I make the selection on screen 2 (filters) there is no change in the gallery on screen 1

  • mdevaney Profile Picture
    29,991 Moderator on at

    @iagosalvadori 

    While testing you should only use this code in the Items property of your 2nd gallery.  This will eliminate the possibility that the issue is in another criteria.  Please do this.

     

    Filter(Despesas; I_CC = Blank() Or 'Centro de Custo' = I_CC)

     

    Question:  What column type is Centro de Custo in SharePoint?

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • iagosalvadori Profile Picture
    68 on at

    Hi @mdevaney 

     

    I did the test just using this code in mt gallery (screen 1) and it didn't work.

     

    The column is of type text:

    Anotação 2020-05-04 132244.png

  • mdevaney Profile Picture
    29,991 Moderator on at

    @iagosalvadori 
    In your original screenshot there was an error showing.  Does it still appear.  If yes, please share a screenshot of the message.

  • iagosalvadori Profile Picture
    68 on at

    @mdevaney 

     

    Anotação 2020-05-04 133227.png

  • mdevaney Profile Picture
    29,991 Moderator on at

    @iagosalvadori 

    Error message.  What does it say?  Does it still appear?

  • iagosalvadori Profile Picture
    68 on at

    Hi @mdevaney 

     

    I said that only the code in Items doesn't work:

    Anotação 2020-05-04 134356.png

    I tried to filter through the center cost: E410 but it appears expenses from the center cost E430:

    Anotação 2020-05-04 134541.png

     

    Collumn type 'Centro de Custo':

    Anotação 2020-05-04 133227.png

  • mdevaney Profile Picture
    29,991 Moderator on at

    @iagosalvadori 
    I will ask one more time, does the error message still appear?  If yes, please provide a screenshot of it.

  • iagosalvadori Profile Picture
    68 on at

    Hi @mdevaney ,

     

    No error message appears. But the filter function does not work as shown in the reply above.

     

    Example:

     

    I want filter expensives center cost (Cost Center) = E410 but E430 record still appears in the gallery (Screen1)

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 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard