cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StanP
Frequent Visitor

Customized Power App Form - Displaymode editing based on people column in another list

Hello all,

 

I've been struggling with a scenario I want to run in a customized form I am trying to create. Hopefully someone could shed some light on the situation.

 

I have a request form created by a 'Requester' , and there are 2 fields(Marketing Approver,Finance Approver) on the request form which are lookup type fields that are looking in a respective list's title column (Marketing Approver list and a Finance Approver list).

 

In the mentioned lists the title column is named after the main Approver - in those lists , there are 2 other People columns - Main Approver(which matches the typed out name in the Title column) and Substitute approvers(which is a multi select people column) for the Main Approvers - this setup is the same for both Marketing and Finance lists.

 

Now what is expected: an item is created in the main list(where the customized form is) , the person creating the request puts a Finance Approver and a Marketing approver in their respective control fields - (which are dropdowns with the Title fields names on there), an approval flow is started in the back. Within the form , I have 4-5 fields which are supposed to be edited only by the marketing approvers. I want to make it so that depending if the user().email is within the Main Approver column or the Substitute approver column the display mode is on edit , otherwise its on view.

 

I have another list with a transportation department which i managed to filter but they do not have backups on another column with this :

 

 If(LookUp('Transportation',User().Email='Transportation Person column'.Email,true),DisplayMode.Edit,DisplayMode.View)

 

I cant manage to figure out how to make it for the Main approver column and Substitute approval column both when editing the item the displaymode to be filtered based on who the user is within those 2 fields in the Marketing Approval list. Note that the Substitute approvers list is a multi people picker and i have 2 substitutes for every main approver.

 

The Approvers list would look something like this :

 

Title:                            Main Approver:                 Substitute Approvers:

Merry Poppins              Merry Poppins                   John Doe , Jane Doe

 I would appreciate your expertise on this , community!

 

 

1 REPLY 1
StanP
Frequent Visitor

Okay I think I created a not very efficient solution to part of the issue :

 

If(SharePointForm1.Mode=FormMode.New,DisplayMode.Edit,If(SharePointForm1.Mode = FormMode.Edit && LookUp('Marketing Approvers', vUser.Email = 'Main Approver'.Email,true) Or LookUp('Marketing Approvers',vUser.Email in 'Substitute Approvers'.Email,true) Or LookUp('Transportation',vUser.Email='Transportation approver'.Email,true) ,DisplayMode.Edit,DisplayMode.View))

I put this on the DisplayMode of the fields I'd like to be enabled.


Now I only need to find out how to filter so not every approver from the list can edit but only those related to the title that is selected in the form and it has to corelate to the row in the approvers SharePoint list.

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (52,218)