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

Controlling Form with global variable

Hello,

 

When users log into my app they are given an access level (number between 1 and 5) which is Set to a global variable.

 

I've managed to use the Value function in the app to convert it into a number such that arguments like '>' work. However this does not seem to work on a form dismplay mode, see below:

 

displaymode.PNG

 

The error says: "The property expects Enum values, but this rule produces incompatible Text values".

 

My forumula:

 

If(Value(Access_level)>4,DisplayMode.Edit,
If(dropdown_user.Selected.Operator=DataCardValue15_1.Text,
    FormMode.Edit,
    FormMode.View))

 

I'm not sure if this is a bug or if I am doing something stupid, please can you help?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Max1
Level: Powered On

Re: Controlling Form with global variable

Big apologies! I'd been staring at it for too long and missed a very silly mistake!!

 

I was using display mode instead of form mode in the first line of the forumla, it should read:

 

If(Value(Access_level)>3,FormMode.Edit,
If(dropdown_user.Selected.Operator=DataCardValue15_1.Text,
FormMode.Edit,
FormMode.View))

 

View solution in original post

1 REPLY 1
Max1
Level: Powered On

Re: Controlling Form with global variable

Big apologies! I'd been staring at it for too long and missed a very silly mistake!!

 

I was using display mode instead of form mode in the first line of the forumla, it should read:

 

If(Value(Access_level)>3,FormMode.Edit,
If(dropdown_user.Selected.Operator=DataCardValue15_1.Text,
FormMode.Edit,
FormMode.View))

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,861)