cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mkosh
Frequent Visitor

Control visibility of fields according to choice field

I have a form that needs to go through 6 levels of approval. I think I can create a sequential Flow workflow to trigger on item create that triggers an approval workflow and updates a choice field with the level of approval. How do I set the visible property of the fields related to each level of approval according to the state of the workflow? My choice field has the values hiring manager, supervisor, finance, VP, Resources, HR. Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Control visibility of fields according to choice field

Hi @mkosh,

 

Since you have several possible choices, (rather than a binary), i would use the Switch() function on the DisplayMode property of each card you want to dynamically make editable on the form. (You could do the same with the Visibility property instead).  I would set the DisplayMode as follows: Switch(Dropdown1.Selected.Value, "manager", DisplayMode.Edit, "supervisor", DisplayMode.Edit, DisplayMode.View).// If the default display mode of the form was View, this would make a particular card and the control inside of it editable only for managers and supervisors. For more details on the Switch() function see: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if. If you wanted to use it to hide the card for everyone except managers and supervisors, the Visible property of the card would be: Switch(Dropdown1.Selected.Value, "manager",true, "supervisor", true,false).

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Control visibility of fields according to choice field

Hi @mkosh,

Is your data source a Sharepoint list and is your choice field a Dropdown control?

mkosh
Frequent Visitor

Re: Control visibility of fields according to choice field

Yes, forgot to mention that!

Super User
Super User

Re: Control visibility of fields according to choice field

Hi @mkosh,

 

Since you have several possible choices, (rather than a binary), i would use the Switch() function on the DisplayMode property of each card you want to dynamically make editable on the form. (You could do the same with the Visibility property instead).  I would set the DisplayMode as follows: Switch(Dropdown1.Selected.Value, "manager", DisplayMode.Edit, "supervisor", DisplayMode.Edit, DisplayMode.View).// If the default display mode of the form was View, this would make a particular card and the control inside of it editable only for managers and supervisors. For more details on the Switch() function see: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if. If you wanted to use it to hide the card for everyone except managers and supervisors, the Visible property of the card would be: Switch(Dropdown1.Selected.Value, "manager",true, "supervisor", true,false).

View solution in original post

Highlighted
mkosh
Frequent Visitor

Re: Control visibility of fields according to choice field

Thank you so much - worked perfectly 🙂

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

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