cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Conditional Visibility based on SP list value

Hi all,

 

I have a dropdown menu in a powerapp which I need to show or hide depending on a value in a sharepoint list. 

 

I tried the following:

 

 

Visible = If(flt_EATfeedback_questions, "YESNO" in AnswerType.Value, true, false)

 

 

and

 

 

Visible = If(flt_EATfeedback_questions, 'Answer Type'.Value = "YESNO", true, false)

 

 

The column is named Answer Type in Sharepoint, so maybe I'm going wrong with the syntax. I am fairly new at all of this so I appreciate any help.

 

Best regards and many thanks,

 

Tom

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Conditional Visibility based on SP list value

Hi @tupues ,

 

OK, could you please try this to Items property of Dropdown?

 If(ThisItem.AnswerType.Value="YESNO", ["YES","NO"], ThisItem.AnswerType.Value="Time",["5min","10min","15min","20min"])

Hope this helps.

Sik

View solution in original post

10 REPLIES 10
Highlighted
Community Champion
Community Champion

Re: Conditional Visibility based on SP list value

What did you put in the item property of the dropdown, kindly show the formula. Also what are you hiding? are you hiding a field on a form?

 

If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution

Highlighted
Helper III
Helper III

Re: Conditional Visibility based on SP list value

Thanks for your answer.
In the powerapp I’m hiding a simple dropdown with yes/no. It’s not part of a form. The formula just contains items=[“yes”,”no”] and works fine. It’s the visibility formula that causes the headache...
Highlighted
Community Support
Community Support

Re: Conditional Visibility based on SP list value

Hi @tupues ,


Do you mean you want to set the dropdown visibility based on Answer Type Column Value?

If "YESNO" exists in the list, make dropdown visible, if not, to be invisible, right?

The Answer Type column is Choices type, right?


Please try this if my understanding is correct:

 

If(IsEmpty(Filter(flt_EATfeedback_questions,AnswerType.Value="YESNO")),false,true)

 

 

Hope this helps.

Sik

 

Highlighted
Helper III
Helper III

Re: Conditional Visibility based on SP list value

Hi Sik,

 

Many thanks for your reply!

 

With the formula you gave the dropdown in the power app is now hidden whenever value does not correspond to any of the choices. The problem is that it is always showing whenever the filter corresponds to any of the possible values in the sharepoint choices even if that choice is not the selected one on the list...

 

Screen Shot 2020-03-16 at 13.02.09.png

Highlighted
Community Support
Community Support

Re: Conditional Visibility based on SP list value

Hi @tupues ,

 

Please show an example. 

What condition/mechanism will drop-down box display?

Sik

Highlighted
Helper III
Helper III

Re: Conditional Visibility based on SP list value

Actually, I have an idea how to solve it another way but I'd still need help...

 

Is there a way to hide certain values of the dropdown choices in the Powerapp based on a selection of a choice made in the sharepoint list.

 

I.e. for the below

 Screen Shot 2020-03-16 at 13.02.09.png

Show:

- Choices = "YES","NO" if the choice in the sharepoint list is YESNO

- Choices = "5min","10min","15min" if the choice in the sharepoint list is Time

etc.

 

Is that possible? It may be easier than hiding the entire dropdown.

 

Sorry for the back and forth, but I am fairly new at this and still learning every day!

 

Highlighted
Community Support
Community Support

Re: Conditional Visibility based on SP list value

Hi @tupues ,

 

Your requirement that hides certain dropdown values can be met, but I cannot offer specific help with existing information.

Could you show a detailed implement logic about your app?

Are there two dropdowns in the App? Are there in the EidtForm? What is Items property of two dropdown?

Can you share some screenshots of the app?

 

Sik

 

Highlighted
Helper III
Helper III

Re: Conditional Visibility based on SP list value

Hi Sik,

 

Thanks for your reply!

 

Below please see the screen of the app and the corresponding sharepoint column settings. It's a gallery with questions on the left and dropdowns on the right. The Item has no property so far - that's what I need the help on.

The drop down choices need to vary depending on the value value selected in the sharepoint list as to show:

 

Powerapp Dropdown Choices = "YES","NO" if the choice in the sharepoint list is "YESNO"

Powerapp Dropdown Choices = "5min","10min","15min","20min" if the choice in the sharepoint list is "Time"

etc.

 

Screen Shot 2020-03-16 at 15.34.56.png

 

Screen Shot 2020-03-16 at 13.02.09.png

 

Thanks again for your help!

Highlighted
Community Support
Community Support

Re: Conditional Visibility based on SP list value

Hi @tupues ,

 

OK, could you please try this to Items property of Dropdown?

 If(ThisItem.AnswerType.Value="YESNO", ["YES","NO"], ThisItem.AnswerType.Value="Time",["5min","10min","15min","20min"])

Hope this helps.

Sik

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,117)