Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hiding data cards based on drop-down selection at start of edit form

I have a survey form that contains a drop down containing a list of customers. This list is drawn from a different sharepoint list than the list that the form submits to. This list of customers also has columns containing the names of the services we deliver, and where a customer is taking that service from us, there is a YES/NO (in boolean True/False) entry that can selected.


The survey form contains two questions per service, for all the services we provide, each with question has its own data card. I would like the edit form to hide all the questions relating to services that the customer is not taking when that customer is selected from the dropdown at the start of the form. I'll also need to do the same for the view form.


We have approximately 80 services so any solution needs to be able to scale to this without crazy huge formulas.


I'm pretty new to Powerapps, so please be as explicit as you can with any suggestions. Many thanks.


Accepted Solutions
Not applicable

I've figured it out, and what was necessary was to nest a lookup inside the IF function.

The formula looks like this:


Visible = If(LookUp(Customers,Customer_Name = DDCustomer.Selected.Value, Service_Name), true, false)

View solution in original post

Resolver I
Resolver I

It sounds like you could check the value of the Dropdown, and set the visible property on the data card with an If() statement.


DataCard1.Visible = If(Dropdown1.Selected.Value="NO",false,true)
Not applicable

Can you expand on what you mean by 'check the value of the dropdown' please? Do you mean by using the formula/expression that you've supplied, or by some other means?



DataCard1.Visible = If(Dropdown1.Selected.Value="NO",false,true)


Really needs to be this

DataCard1.Visible = If(Dropdown1.selected.value=Customerlist.customername && datacard1.displayname=customerlist.service1.value=true,tru,false)

i.e. datacard1 is visible if the customer selected in the dropdown has a value of 'true' in the service name column of the same name as the display name of the data card.


The thing is, I don't know what commands to use, what sytax to use, or how to make it dynamic, i.e. you pick another customer from the drop down at the start of the form and the rest of the form hides or unhides the data cards as appropriate for the new customer that's been selected.

Bookmark this link - - as it's something you'll reference quite often. That will help you with commands/syntax for the forumlas.


Powerapps is inherently dynamic meaning DataCard1.Visible will be true or false, based on the Dropdown1.Selected.Value matching what you want to make it visible.


DataCard1.Visible = 
  Dropdown1.Selected.Value="YOUR VALUE",
    true,    // this sets your visibility to true if the value matches
    false    // this sets your visibility to false if the value doesn't match


Check out this tutorial which will help you understand a little better how PowerApps works.

Not applicable

Thanks, I've been using that list as a reference, it is indeed pretty handy.


Do you have any advice on how to look up whether a customer has a true or false value in a column in a list in which the customer appears as a list item, and how to use that value to show or hide the data card?


I can easily write a basic 'if' statement to show a data card based on the drop down, it's the looking up of a secondary value that I have no idea how to do.

- What are the names of the controls?

- What is the condition? ie... if x = y

- What do you expect to happen if it's true?



Not applicable

For the sake of simplicity, lets say there are two controls on the edit form: DDCustomer, and Service1FeedbackText. These sit on DataCard_1 and DataCard_2 respectively.


The source for the DDCustomer drop down is another sharepoint list named 'Customer_List', using the column named Customer_Name. The format of the customer list is the first column contains the customer name and subsequent columns are named 'Service_1', 'Service_2' etc etc. These columns are a yes/no choice that is made when the customer is added as a line item to the list.


The edit form needs to show DataCard_2 based on whether the Customer that has been selected in DDCustomer has Service_1 set as true(yes) or false(no) in the customer list.


So if the selected customer has the service set to 'true' in the customer list, datacard_2 will be visible, otherwise it will be hidden.

I'm getting lost with the column names. A dropdown doesn't necessarily care about column names, just the Selected.Value (which would be the data in whatever the column name is)


What does the DDCustomer.Selected.Value give you?

DataCard1.Visible =  If(DDCustomer.Selected.Value="YES",true,false)

Not applicable

The DDCustomer.selected.value gives you the customer name from the customer list.



Your if statement DataCard1.Visible =  If(DDCustomer.Selected.Value="YES",true,false) will make datacard1 visible if there is a value in the DDcustomer.selected.value that is "YES".


I need that expression to make Datacard1 visible if the DDcustomer.Selected.Value is a customer that has a service that the customer list indicates that customer is taking, that also matches a property that identifies the Datacard1.

Not applicable

I've figured it out, and what was necessary was to nest a lookup inside the IF function.

The formula looks like this:


Visible = If(LookUp(Customers,Customer_Name = DDCustomer.Selected.Value, Service_Name), true, false)

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,757)