cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 III
Super User III

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 III
Super User III

Hi @mkosh,

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

Yes, forgot to mention that!

Super User III
Super User III

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

Thank you so much - worked perfectly 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (4,842)