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 / How to display Gallery...
Power Apps
Answered

How to display Gallery data only after selecting dropdown menu after exporting and importing solution ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am currently having beginner level skills in development of Power apps solution, therefore looking for solution for the below issue in this community of experts.

 

I am creating a gallery in power apps along with a dropdown. The gallery should only display data when a field is selected from dropdown menu. Dropdown fields values also contain blank values, but the gallery should able to show the other fields related to the blank values. By default gallery data will show blank values or gallery should be invisible for the users if no values have been selected.

 

The properties of dropdown are set as :

Item : Employee

Value : employee_name

Default: Blank()

 

The properties of gallery are set as :

Items: Filter(Employee,

                      employee_name = Dropdown.Selected. employee_name)

Visible : If(

                !IsBlank(Dropdown1.Selected.employee_id),

                true,

                false)

Default :  Blank()

 

I can achieve the desired result in DEV environment but when I export the solution from DEV and IMPORT the solution to TEST environment, the gallery is showing the list of all employees by DEFAULT.

Can anybody help me to achieve the desired solution ?

 

Thank you in advance !

Categories:
  • LucasAnjos Profile Picture
    on at

    Hi @ankibano ,

     

    What if you try using an If statement in the items property of the gallery ? Just like you put in the visible property.

     

    If( !IsBlank(Dropdown1.Selected.employee_id),               

                    Filter(Employee, employee_name = Dropdown.Selected. employee_name),

                    false)

    If this is not your problem, please let me know, I'd be glad to help.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @ankibano

    There is no need for the If().

    !IsBlank(Dropdown1.Selected.employee_id)is either true or false by itself.

    @@Drrickryp

    Department of Redundancy Department 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @LucasAnjos ,

     

    Thank you for your reply

     

    the formula is providing the below error

     

    ankibano_0-1686548982029.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Drrickryp ,

     

    Thank you for reply !

    Eventhough removing IF() did not help to get desired result.

     

     

  • LucasAnjos Profile Picture
    on at

    Hello @ankibano , is this a new error ? Because it is the same code that you were using before, I just put it into a if statement.

     

    Nevertheless, we can try something else. Are you trying to filter a sharepoint list? We could try put this data in a collection (if you're not using it already). This could improve performance and would be easier to manipulate.

     

    If it is a sharepoint list, we could do something like this:

     

    In the OnSelect property of the button that navigates to this screen, use this code:

    ForAll(Employee, //this must be the name of your sp list

    Collect(

      colEmployee,//name of the collection

        {

            Name: ThisRecord.Name // change "name" for exactly the same column name of your sp list

        }))

     

    You can include more columns in your collection, if you need, just add " ; " to break the line.

     

    Remember: you will always add data to this collection when you click on that button, so I suggest to use Clear ( colEmployee ) in the "back" button, for example. 

     

    If you add a collection like this, I'm sure that code that we talked before will work just fine.

     

     

     

     

     

     

  • Verified answer
    LucasAnjos Profile Picture
    on at

    I forgot to include this in the formula:

     

    If( !IsBlank(Dropdown1.Selected.employee_id),               

                    Filter(Employee, employee_name = Dropdown.Selected.Value),

                    false)

    you should use dropdown.selected.value to use the value inside the dropdown.

  • LucasAnjos Profile Picture
    on at

    Hello @ankibano , is it working?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thank you for your contribution !

     

    I forgot to mentioned that I was using Filter(Employee, employee_name = Dropdown.Selected.Value || Blank()) and in my dataset we have blank values for employee name.

     

    We were connecting to datasources using custom connector.

     

    After removing the Blank from FILTER function, the solution started working

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard