cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Xzandrate
Level: Power Up

Referencing Get Items results in Apply to each

I'm really new to flows, and haven't found a good resource to go through advance logic with it, so I may be approaching this the wrong way.  But I'm hoping someone can provide some insight.

 

I've got a pair of Sharepoint lists, and a Sharepoint Document store.  One of the lists, ApprovalList is to hold reviewers for the document, it holds a custom number RequestID field, associated to a person and a yes/no toggle if they approve.  The second list, ApprovalDocuments, uses the same RequestID, an attachment field, and a FileID field to track the document's ID in the file store.

 

When an item is created in ApprovalDocuments a flow triggers to copy the Attachment to the filestore, and writes the RequestID to the file properties, and then writes the files ID back to the ApprovalDocument triggering item.

 

In a seperate approval flow, I'm doing a check when anyone sends back an approve response.  I check the ApprovalList where the RequestID is the same, and filter to see if there is any approval set to no.  If the length of the result is 0, all approvals must be yes.  So now I want to update the file properties in the filestore to send for approval.

 

I've tried going back to the ApprovalDocuments list where I was storing the files ID in a FileID column, but when I do a Get Items to pull back just the FileID column, in the subsequent Apply to each->Update file properties I can't reference FileID in the ID field, there isn't a more link either.  Using the Current item from Apply to each would be fine, but it looks like I still need a way to parse out that value.

 

Is ID a unique type other than numeric? Does it require a conversion?  Could I go an look up the file in the file store with the RequestID field somehow?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Xzandrate
Level: Power Up

Re: Referencing Get Items results in Apply to each

Hopefully this works.

https://drive.google.com/open?id=1dWiRHcswZ9LdoxIdQJOVXBXn9xBK05je

 

https://drive.google.com/open?id=1NF8B0ygoBnwXjfnqlPDaf28ErxRHQV5Z

 

I've developed around the issue, using a different flow, but would still appreciate the incite  as to if this approach had any merit.

 

Thanks

 

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Referencing Get Items results in Apply to each

Hi @Xzandrate,

 

Could you please share a full screenshot of the configuration of your flow?

Could you share the details of your SharePoint list and SharePoint Document?

If you can share more screenshots and details, maybe we could find the right workaround faster and provide it to you.

 

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.
Xzandrate
Level: Power Up

Re: Referencing Get Items results in Apply to each

Hopefully this works.

https://drive.google.com/open?id=1dWiRHcswZ9LdoxIdQJOVXBXn9xBK05je

 

https://drive.google.com/open?id=1NF8B0ygoBnwXjfnqlPDaf28ErxRHQV5Z

 

I've developed around the issue, using a different flow, but would still appreciate the incite  as to if this approach had any merit.

 

Thanks

 

View solution in original post

Community Support Team
Community Support Team

Re: Referencing Get Items results in Apply to each

Hi @Xzandrate,

 

The Id needed in the update file properties needs to be obtained from the action associated with the corresponding Library, such as Get items or Get file properties(Configure the same name as the update file properties action in the Library name field).

This Id is not a custom column, it is metadata column, which is automatically generated when the file is created, to identify the uniqueness of the file.

You could assign this Id value to RequstID in the previous action and then populate the Id filed in Update file properties with "items(‘Apply_to_each)[‘RequestID’].

 

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.
Administrator
Administrator

Re: Referencing Get Items results in Apply to each

Hello, @Xzandrate!

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-bacao-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
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!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 440 members 5,911 guests
Please welcome our newest community members: