web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional Visibility...
Power Apps
Answered

Conditional Visibility based on SP list value

(0) ShareShare
ReportReport
Posted on by 121

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

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    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

  • tupues Profile Picture
    121 on at
    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...
  • v-siky-msft Profile Picture
    on at

    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

     

  • tupues Profile Picture
    121 on at

    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

  • v-siky-msft Profile Picture
    on at

    Hi @tupues ,

     

    Please show an example. 

    What condition/mechanism will drop-down box display?

    Sik

  • tupues Profile Picture
    121 on at

    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!

     

  • v-siky-msft Profile Picture
    on at

    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

     

  • tupues Profile Picture
    121 on at

    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!

  • Verified answer
    v-siky-msft Profile Picture
    on at

    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

  • tupues Profile Picture
    121 on at

    Great! That did it, thank you so much!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard