cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Issue populating dynamic field into approval flow

Customer Requirements:

  • Invoice gets put into specific location (a SP Folder)
  • Initiates a workflow that starts a linear approval process - Approver 1, then Approver 2. 
  • I need to be able to replicate and deploy this flow 50-100 times, so a requirement of mine from the development side is as many dynamic fields as possible to minimize manual manipulation to each flow I copy/paste.

I have a SharePoint Library with the following columns (red-colored font are required fields):

  1. Approver #1 (People Picker)
  2. Approver #1 Status (Choice) - 1st Choice: Pending (Default Value), 2nd Choice: Approve, 3rd Choice: Denied
  3. Approver #1 Comments (Multi-Line Text Box)
  4. Approver #1 Timestamp (Single-Line Text Box)
  5. Approver #2 (People Picker)
  6. Approver #2 Status (Choice) - 1st Choice: Pending (Default Value), 2nd Choice: Approve, 3rd Choice: Denied
  7. Approver #2 Comments (Multi-Line Text Box)
  8. Approver #2 Timestamp (Single-Line Text Box)
  9. A/R Rep (Default Library column: Created By renamed to "A/R Rep")

Here is my Flow (more details below the image): 

flow.png

 

The flow continues further on down to a second approver and various emails and such, but the above image shows where I am getting stuck.

 

In my first version of the flow I did not have the "Delay" action included in the Flow, nor did I have the 2 Condition Actions: (1) "Condition" and (2) "Condition 2" and I was getting this error: The request failed. Error code: 'InvalidApprovalSubscribeRequestAssignedToMissing'. Error Message: 'Required field 'assignedTo' is missing, empty, or contained no valid users.'.

 

This error made me think to myself, okay... The document is being uploaded and the flow is kicking off before the document uploader can set the metadata for the two required columns (Approver #1 and Approver #2), so I went online and found a trick to use the "Condition" in an effort to hold up the flow in a state of pause until the document uploaded assigned metadata to the two required columns. I still got the error stated above. 

 

I then thought, what if I set an inherit delay into the flow, hence the addition of the "Delay" action and I set it to 1 minute - plenty of time to do the required fields. I sat and watch the flow, and I saw the countdown from 1 min to 0 seconds, flow would process and I STILL get the same error. 

 

To me the error is indicating that it is not able to detect a value in the "Assigned To" field within the first Approval action. 

 

Here is an image of the error:

flow2.png

wwefwef

The weird thing is... If I change the initial Trigger Step to "When a file is created or modified (properties only)" using this exact same process works as intended - the problem is, when I go and update the metadata of the file as a result of the Approve/Reject from an Approver it starts a second instance of the flow, because the file's metadata is modified.

 

The WHOLE reason I want this to work is so I can reduce my total number of manual entry points into the flow so I can replicate it many times. The ONE thing I want to work is I want to be able to auto-populate the Approver's email address into the Approval email, which is dynamic metadata as a result of requiring "Approver #1" (People Picker) and "Approver #2" (People Picker). Here is a screenshot of the field I want to be Dynamic, but is the reason why this flow isn't working:

flow3.png

That field I highlight above is "Approver #1 Email" which is something that should be able to pull from the AD, because using People Picker field. 

 

I cannot use "Get Manager," which is a very common solution I found online, but it won't work in our tenant due to accuracy/data integrity related issues.

 

Any help would be greatly appreciated.

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Issue populating dynamic field into approval flow

Hi @Michelangelo,

 

Have you tried to output the values of the Dynamic content populated in Assigned to?

You could output this value to see if it is the expected value.

From the error message, it seems that this email address may not be a user within the organization, or is not a valid email address.

Please make sure that the value of Dynamic content populated here is a valid email address and must be a user within the organization.

Take a try.

 

Best Regards,

Barry

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

Re: Issue populating dynamic field into approval flow

I thought of that. For my testing of the Flow I was using one of my service accounts - the service account we use for Flow creations (because we are an MFA environment), and in my SP List in the "Approver 1" field I was inputting my own name, and so I don't think this is the issue 😕

Highlighted
Administrator
Administrator

Re: Issue populating dynamic field into approval flow

Hello, @v-bacao-msft!

Thank you for posting a reply to a topic on the Microsoft Flow Community! It appears that the users who you have been engaging in this thread with are now awaiting your reply! Please follow-up on this thread ASAP.

Thank You!

-Gabriel

Microsoft Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
Highlighted
Advocate I
Advocate I

Re: Issue populating dynamic field into approval flow

I don't think his response is necessary. If that was his contribution, then that is that. It was a valid question, but I had already thought of it 🙂

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,624)