cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maries1986
Helper IV
Helper IV

Visibility based on dropdown values

Hello everyone,

 

I have visibility based on a drop down value on a data card 

 

If(
Dropdown10.SelectedText.Value = "705-P4559-BOI Bentley",
true,
false
)

 

Works great but problem is.....i want the datacard to show based on that value and also another?

 

i have tried And and Or but doesnt work.   What am i missing?????  i need the datacard to show if i select lots of values 

21 REPLIES 21
RandyHayes
Super User
Super User

@maries1986 

Is your Items property based on Choices then??  Choices returns a table of records that have a single column called Value.  So, the only column available to you will be Value.

 

But I am confused on your response - initially we were discussing the Visible property for your control, but now it seems that you are more focused on the dropdown and the updates.

 

So, the next question would be, what type of column is the underlying field for your datacard?  I assume we are referring to a Pricing3 column?  Is it a choice column or a text column or something else?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
maries1986
Helper IV
Helper IV

Hi @RandyHayes  apologies,   its is the same column i was struggling to update the visibility.

 

It is a choice field - Pricing 3  

 

I added to the SP form.   It pulls the choice from one list to another.  both Choice fields.  

RandyHayes
Super User
Super User

@maries1986 
So, if this is a Choice column, then your Dropdown Items property should be set to: Choices(yourDataSource. Pricing3)

This will show all the available choices for the column.

The Default property of your DataCard should be : ThisItem.Pricing3

The Default property of your Dropdown control should be : Parent.Default

The Update property of your DataCard should be: yourDropdownName.Selected

 

The Visible property of your Datacard though, is something we should tackle next.  You originally mentioned a dropdown (Dropdown10) as as your source of determining visibility, but is that the Pricing dropdown or something else?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes 

 

The problem is....that is what i have in those 2:-

 

The Default property of your DataCard should be : ThisItem.Pricing3

The Default property of your Dropdown control should be : Parent.Default

 

This is what i have in items to filter out the dropdown values.   

 

Distinct(Filter('Billing Codes', 'Engagement Code' = Dropdown10.Selected.'Systal PCode New',And(Title=Dropdown2.Selected.Result)),'Device Size'.Value)  

 

maries1986
Helper IV
Helper IV

@Randy forgot to mention.   the Defaults both error stating error in formula.

 

I have been at this all day.....The update also wont work 

I tried changing my items to just picking the column choices......see if that would work.

 

maries1986_0-1635189167465.png

 

 

RandyHayes
Super User
Super User

@maries1986 

So if this has been the Items property of your Dropdown:

Distinct(Filter('Billing Codes', 'Engagement Code' = Dropdown10.Selected.'Systal PCode New',And(Title=Dropdown2.Selected.Result)),'Device Size'.Value)  

Then No, your items will not have a Value - they will have a Result column.

Choices returns a table with a single column called Value.

Distinct returns a table with a single column called Result

 

However, your formula is a little off...it should be:

Distinct(
    Filter('Billing Codes', 
        'Engagement Code' = Dropdown10.Selected.'Systal PCode New' &&
        Title = Dropdown2.Selected.Result
    ),
    'Device Size'.Value
)  

That assumes that the Dropdown10 and Dropdown2 controls have those columns in their Items formula.

 

The Choices would work, but if you need some filtering, then your original should be fine.

 

BUT...I'm getting quite confused as to which dropdown is which.  You've mentioned several of them now and not sure what is in which datacard or what Items it has or how it fits in.  So, you might need to explain some of that a little further.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
maries1986
Helper IV
Helper IV

@RandyHayes 

 

Hi Randy

 

I have made the dropdown as simple as possible.

 

Filter('Billing Codes', Title = Dropdown2.Selected.Result)

 

I have changed the column in billing codes - Device size to single line text.

 

I just want what ever is in dropdown 16 to update SP and default to what ever is in SP when i open the app. 

 

I have so many dropdowns that work perfect.   this is one is just not wanting any formulas in the default.

 

 

maries1986
Helper IV
Helper IV

maries1986_0-1635251098010.png

maries1986_1-1635251128953.pngmaries1986_2-1635251155488.png

 

 

maries1986
Helper IV
Helper IV

Hi @RandyHayes 

 

I gave up on choice columns and make then both single line text.  I dont think powerapps is compatible with SP Choice fields 

 

Thanks for the responses 

Helpful resources

Announcements
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 (3,261)