cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mkosh
Level: Powered On

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
Level: Powered On

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

mkosh
Level: Powered On

Re: Control visibility of fields according to choice field

Thank you so much - worked perfectly 🙂

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,779)