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 / Formula for Visible pr...
Power Apps
Unanswered

Formula for Visible property to make additional fields appear when certain answers are selected.

(1) ShareShare
ReportReport
Posted on by

Hi,

I'm building an incident report form in a canvas app that has a question with a multi-select drop-down menu. If the user selects certain answers, additional questions will appear. I have the Visible properties set on each of these additional questions so they only appear if the particular drop-down answer they relate to is selected. It works great so long as the user only selects one answer from the drop-down.

 

Visible: DataCardValue5.Selected.Value = "Vehicle Damage/Crash"

 

When a field is relevant for a variety of answers, I have its visible property set with this formula:

 

If(DataCardValue5.Selected.Value = "Bloodborne Pathogen Exposure", true, DataCardValue5.Selected.Value = "Fatality", true, DataCardValue5.Selected.Value = "Overnight Hospitalization", true, DataCardValue5.Selected.Value = "Received Medical Treatment Beyond First Aid", true, false)

 

What I can't figure out is when the user selects multiple answers from the drop-down, how to make it so all relevant fields still show up. Logically, it makes sense that the Visible property would have an and/or function, but I'm not sure how to write that. 

 

So, for example, if the user selects both "Bloodborne Pathogen Exposure" and "Chemical/Environmental Exposure" no additional fields come up. If the user selects "Bloodborne Pathogen Exposure" and "Fatality", the additional field both have in common shows up, but not the fields that are uniquely relevant to each answer.

 

Any ideas how to write a formula that will have fields pop up when they are relevant to at least one of the drop-down answers?

 

Thanks!!

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @ahartsfield 
    For Visible try this (but you can put it back to the one you had if it was working - it's more inspiration for your other issue):

     "Bloodborne Pathogen Exposure" in DataCardValue5.SelectedItems.Value ||
     "Fatality" in DataCardValue5.SelectedItems.Value ||
     "Overnight Hospitalization" in DataCardValue5.SelectedItems.Value ||
     "Received Medical Treatment Beyond First Aid" in DataCardValue5.SelectedItems.Value

    For the other part that I think you did not give as formula example, try seeing if the in approach as illustrated above works as inspiration for the other issue you had.

     

    See if it helps @ahartsfield 

  • ahartsfield Profile Picture
    on at

    @poweractivate 

    Thank you! That solved one of my problems. Now the field "Assigned Worksite Location" appears and stays up even when multiple items from the drop-down are selected.

     

    The next piece I need to solve is how to code the other fields to appear and stay when multiple drop-down items are selected. Right now, if a field (such as "Route of Exposure") is only set to appear if "Bloodborne Pathogen Exposure" is selected from the drop-down on DataCardValue5. It appears when that is the only value selected from the drop-down, but as soon as I select any other item from the drop-down, it disappears again. 

     

    I'm grateful for your help solving the first piece. If you have any advise on the second, please let me know. 🙂

  • ahartsfield Profile Picture
    on at

    Actually - your first message fixed that too! I just need to follow the same pattern in each data card's Visible property:

    "Bloodborne Pathogen Exposure" in DataCardValue5.SelectedItems.Value

    Thanks again!!

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard