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

Restricting Choice field editing.

I have an Approval status field (a choice field) in a form and it has three possible values. "In Progress", "Ready for Review" and "Manager Approved".

 

When a user completes the record, he will change the status from In Progress to "Ready for Review". He should not be allowed to change the value to "Manager Approved". Only the user's Manager should be allowed to change the Status to Manager Approved. The manager can change it to any value he likes. 

 

We also have the employee field and the manager field captured in seperate fields.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Restricting Choice field editing.

Hi @cooltechie,

Could you please share a bit more about the data structure of your SP list?

Could you please share a bit more about the employee field and manager filed? Are they Person type column or Single line of text column?

I have made a test on my side, please take a try with the following workaround:

The data structure of my SP list as below:1.JPG

Note: The Employee column and Manager column are both Person type columns in my SP list.

App's configuration as below:2.JPG

 

3.JPG

Within the Edit form, unlock the ApprovalStatus Data card. Set the Items property of the Combo Box control to following:

If(
    EditForm1.Mode=FormMode.Edit,
    If(
        User().Email = ThisItem.Manager.Email,
        Choices('20181221_case3'.ApprovalStatus),
        Filter(Choices('20181221_case3'.ApprovalStatus),Value<>"Manager Approved")
    ),
    Choices('20181221_case3'.ApprovalStatus)
)

On your side, you should type:

If(
    EditForm1.Mode=FormMode.Edit,
    If(
        User().Email = ThisItem.ManagerColumn.Email,
        Choices('YourSPList'.ApprovalStatus),
        Filter(Choices('YourSPList'.ApprovalStatus),Value <> "Manager Approved")
    ),
    Choices('YourSPList'.ApprovalStatus)
)

Note: I assume that the Employee column and Manager column are both Person type column in your SP list.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
TimRohr
Level 10

Re: Restricting Choice field editing.

The answer to this is in the responses to the other threads you have started on this topic.

 

If I can make a suggestion... Shotgun-style posting (with multiple threads started over different restatements of the same question) isn't really helpful. It doesn't help you, who has to jump between threads to find your answer, and it doesn't help someone 3 months from now having the same problem who is looking for an answer.

 

There are knowledgeable people in this forum who are willing to take the time to share what they know and help out! And I have yet to see a well-formed question go more than 24 hours without getting a response. So post your question, be clear and thorough about what you want to accomplish (and maybe what you've tried), and then trust the forum process.

 

I promise you will get the answers you're looking for!Man Wink

Community Support Team
Community Support Team

Re: Restricting Choice field editing.

Hi @cooltechie,

Could you please share a bit more about the data structure of your SP list?

Could you please share a bit more about the employee field and manager filed? Are they Person type column or Single line of text column?

I have made a test on my side, please take a try with the following workaround:

The data structure of my SP list as below:1.JPG

Note: The Employee column and Manager column are both Person type columns in my SP list.

App's configuration as below:2.JPG

 

3.JPG

Within the Edit form, unlock the ApprovalStatus Data card. Set the Items property of the Combo Box control to following:

If(
    EditForm1.Mode=FormMode.Edit,
    If(
        User().Email = ThisItem.Manager.Email,
        Choices('20181221_case3'.ApprovalStatus),
        Filter(Choices('20181221_case3'.ApprovalStatus),Value<>"Manager Approved")
    ),
    Choices('20181221_case3'.ApprovalStatus)
)

On your side, you should type:

If(
    EditForm1.Mode=FormMode.Edit,
    If(
        User().Email = ThisItem.ManagerColumn.Email,
        Choices('YourSPList'.ApprovalStatus),
        Filter(Choices('YourSPList'.ApprovalStatus),Value <> "Manager Approved")
    ),
    Choices('YourSPList'.ApprovalStatus)
)

Note: I assume that the Employee column and Manager column are both Person type column in your SP list.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 209 members 4,551 guests
Please welcome our newest community members: