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!
Solved! Go to Solution.
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.
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.
The full flow is below. I'll go into each action.
The trigger uses When an item is created in the Student Courses list.
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.
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.
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.
Hope it all makes sense and is what you are after.
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.
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.
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.
The full flow is below. I'll go into each action.
The trigger uses When an item is created in the Student Courses list.
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.
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.
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.
Hope it all makes sense and is what you are after.
This works!! Thank you soooo much grantjenkins for taking the time to explain things so simply! U are wonderful!
User | Count |
---|---|
93 | |
39 | |
24 | |
20 | |
16 |
User | Count |
---|---|
129 | |
49 | |
48 | |
30 | |
25 |