cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EugeneLowNYP
New Member

Need help with using Lookup to specify who to assign approval action

Hi experts out there, I would appreciate some help.

 

I'm trying to create an approval process using Power Automate triggered by MS List. However, the approval is dependent on the course a student is taking.

e.g. if student is taking Course A, the approval request should go for Director X, but if student is taking Course B, approval request should go to Director Y.

 

I created another MS List as a Lookup table, basically containing information about the courses and the corresponding approving directors.

Initially I tried creating the approving directors field as "Person or Group", but the Lookup doesn't work on my main list.

So to overcome that, I changed the approving directors field to "Single line of text" and put in the name of the directors as in their Outlook account.

 

When I test the flow, it doesn't work as it says "Required field 'assigned to' contained no valid users in the organisation".

 

I don't think there is anything wrong with my flow implementation as it works when I specify the approving director directly in the start and wait for approval action within Power Automate.

 

Is there any way to solve this pls anyone? Thks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
grantjenkins
Community Champion
Community Champion

I've created a quick example to show how it works.

 

I've got two lists:

 

Courses contains a list of courses and the director associated with the course. The Director field is of type Person and set to mandatory.

grantjenkins_0-1666872397293.png

 

Student Courses contains a list of students and what course they are taking. The Course field is of type Lookup pointing to the Courses list and using Title (title of the course) and is also set to mandatory.

grantjenkins_1-1666872503855.png

 

The full flow is below. I'll go into each action.

grantjenkins_3-1666872591051.png

 

The trigger uses When an item is created in the Student Courses list.

grantjenkins_4-1666872636687.png

 

I then use Get item to get the Course (and Directory) from the Courses list using the Course Id that's part of your Trigger output since you have a Lookup column to the Courses list.

grantjenkins_5-1666872708712.png

 

Next, I have Start and wait for an approval using the outputs from both the Trigger and the Get item action. In this example everything comes from the Trigger output except for the Director Email which comes from Get item.

grantjenkins_6-1666872808250.png

 

Lastly, I have the Condition to check the outcome of the approval. This is where you would add your appropriate actions depending on whether it was approved or rejected.

grantjenkins_7-1666872885755.png

 

Hope it all makes sense and is what you are after.



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.

View solution in original post

3 REPLIES 3
grantjenkins
Community Champion
Community Champion

You should definitely be using a Person field in your lookup list for the approving director.

 

You will only see the course show up on your main list when you select the course, but it will also include the id of the lookup list that you can access from your Power Automate.

 

In your Power Automate you can use Get item using the course id in your main list to get that item. Then you can get the approving director details from the Get item action.

 

If you want me to create a full example for you then let me know.



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.
grantjenkins
Community Champion
Community Champion

I've created a quick example to show how it works.

 

I've got two lists:

 

Courses contains a list of courses and the director associated with the course. The Director field is of type Person and set to mandatory.

grantjenkins_0-1666872397293.png

 

Student Courses contains a list of students and what course they are taking. The Course field is of type Lookup pointing to the Courses list and using Title (title of the course) and is also set to mandatory.

grantjenkins_1-1666872503855.png

 

The full flow is below. I'll go into each action.

grantjenkins_3-1666872591051.png

 

The trigger uses When an item is created in the Student Courses list.

grantjenkins_4-1666872636687.png

 

I then use Get item to get the Course (and Directory) from the Courses list using the Course Id that's part of your Trigger output since you have a Lookup column to the Courses list.

grantjenkins_5-1666872708712.png

 

Next, I have Start and wait for an approval using the outputs from both the Trigger and the Get item action. In this example everything comes from the Trigger output except for the Director Email which comes from Get item.

grantjenkins_6-1666872808250.png

 

Lastly, I have the Condition to check the outcome of the approval. This is where you would add your appropriate actions depending on whether it was approved or rejected.

grantjenkins_7-1666872885755.png

 

Hope it all makes sense and is what you are after.



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.

This works!! Thank you soooo much grantjenkins for taking the time to explain things so simply! U are wonderful!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,474)