cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChadVKealey
Level 10

SharePoint "Get item" (singular!) issue

I have a list called "Terms" which includes a person field called "TermContact". I have another list and form (using PowerApps) where users select a Term (choices come from the Terms list, but it is not a Lookup column) and the PA form gets the Item ID of that term from the list and puts it into a field called "TermItemID".

 

In Flow, I want to get some other fields from that Terms list, so I tried using the SharePoint > Get item action. This takes the site URL, a list name and an Item ID. Unfortunately, when I try to populate the Item ID, the only value I can select is the ID of the item just created in the list; I cannot specify the "TermItemID". 

 

I did try the same thing using "Get items" with a filter of "ID eq TermItemID", and it gets the correct value, but then whenever I try to use the output, Flow keeps adding a "Apply each" loop. 

 

This used to be very easy to do in SP Designer, but knowing that that is going away, we're trying to avoid it and build everything in Flow.

1 ACCEPTED SOLUTION

Accepted Solutions
ChadVKealey
Level 10

Re: SharePoint "Get item" (singular!) issue

Kris,

 

Thanks for your reply, but I was able to find a solution. BTW, the "Get item" action is different from the "Get items" action in that it takes only three values: Site, List and ID, so there is no "Odata Filter" option. At any rate, here is the solution I found. Note that I renamed the action to "Get Term Deails."

 

GetItem-TermDetails.png 

View solution in original post

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: SharePoint "Get item" (singular!) issue

Hi @ChadVKealey,

 

Could you please share a screenshot of your flow's configuration?

Could you please share a bit more about your two SharePoint lists?

Do you want to type the TermItemID variable from your PowerApps app into the Item Id field of the "Get item" action?

Further, do you add a OData query within the Filter Query field of the "Get items" action?

 

If you want to pass TermItemID variable from your PowerApps app into the Item Id field of the "Get item" action within your flow, you should add a PowrApps Button trigger as the trigger of your flow. More details about passing variables from PowerApps app to flow, please check the following article:

Start a flow from an app

 

In addition, I think there is something wrong with OData query that you provided within Filter Query field of the "Get items" action. You should change the TermItemID into a specific value within your OData query that you provided as below:

ID eq SpecificValue

More details about OData query in SharePoint, please check the following article:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-...

 

The output of the "Get items" action returned is an array, so when you reference dynamic contents from it, the "Apply to each" action would be added automatically. If you want to get the single one record from the "Get items" action, I think the first() function could achieve your needs:7.JPG

The Inputs field of the "Compose" action set to following formula:

first(body('Get_items')?['value'])

If you want to reference dynamic content from above single one record, please take a try with the following formula:8.JPG

Inputs field of the "Compose 2" action set to following formula:

outputs('Compose')?['TaskName']

On your side, you should type the following formula:

outputs('Compose')?['ColumnNameOfYourSPList']

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ChadVKealey
Level 10

Re: SharePoint "Get item" (singular!) issue

Kris,

 

Thanks for your reply, but I was able to find a solution. BTW, the "Get item" action is different from the "Get items" action in that it takes only three values: Site, List and ID, so there is no "Odata Filter" option. At any rate, here is the solution I found. Note that I renamed the action to "Get Term Deails."

 

GetItem-TermDetails.png 

View solution in original post

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 (Last 30 Days)
Users online (4,667)