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

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

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?

Highlighted
Frequent Visitor

Re: Control visibility of fields according to choice field

Yes, forgot to mention that!

Highlighted
Super User III
Super User III

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
Frequent Visitor

Re: Control visibility of fields according to choice field

Thank you so much - worked perfectly 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,818)