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
Drrickryp
Super User II
Super User II

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
Drrickryp
Super User II
Super User II

Hi @mkosh,

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

mkosh
Frequent Visitor

Yes, forgot to mention that!

Drrickryp
Super User II
Super User II

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

Thank you so much - worked perfectly 🙂

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,287)