cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
slyuso
Level: Powered On

Action "Get Items" select fields

Hi. My goal is to synchronize a list from a .csv file.

To simplify,  the list has one column - Key

 

The .csv file has one column csvKey. If a line (current csvKey) in .csv file is not found in the list, add it. 


The steps are as follows.

1. Read items from a list to build an array of keys (not Item IDs) - ListKeys I used "Add item to Array" action in a loop to build the array.

2. For every line in .csv file check if currentKey in not  ListKeys array, add it.

This logic works fine for a new list or list with few items. In my case, the list has about 3000 items.

 

Issue. Loading the list items takes 5-7 minutes. I needed to add explicit number of items to override default 100 items.
Returned all the fields in the list including complicated lookup values.

 Question. Is there any way to use $select with the list of the fields I want to use? When I tried to use $select in Filter for “Get Items” action, I got an error. Here are details:

GetItems.jpg

ErrorMessage.PNG
 

Also, I used the array ListKeys. But with 3000 items, building the array dynamically by adding elements in a loop does not look as a good idea.
The workflow timed out during this process.

Any suggestions ?
Thank yiou 


1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Action "Get Items" select fields

Hi @slyuso,

 

Do you want to filter items the "Get items" action returned or specify which fields to return for a given list?

 

The Filter Query field of "Get items" action is required to fill an OData filter query to restrict the entries returned, the $select query option is used to specify which fields to return for a given list, list item, or other SharePoint object represented by an entity set, we could not use $select query option within Filter Query field of "Get items".

 

The Select Query is not supported in "Get items" action of SharePoint connector of Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

If you want to narrow down columns of the result that the "Get items" action returned, I think the "Select" action could achieve your needs:22.JPG

Within Map entry, choose these columns (Dynamic content) that you want to show up. More details about the usage of "Select" action, please check the following article:

https://flow.microsoft.com/en-us/blog/microsoft-forms-tables-flow-failures/

 

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

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

 

 

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.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Action "Get Items" select fields

Hi @slyuso,

 

Do you want to filter items the "Get items" action returned or specify which fields to return for a given list?

 

The Filter Query field of "Get items" action is required to fill an OData filter query to restrict the entries returned, the $select query option is used to specify which fields to return for a given list, list item, or other SharePoint object represented by an entity set, we could not use $select query option within Filter Query field of "Get items".

 

The Select Query is not supported in "Get items" action of SharePoint connector of Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

If you want to narrow down columns of the result that the "Get items" action returned, I think the "Select" action could achieve your needs:22.JPG

Within Map entry, choose these columns (Dynamic content) that you want to show up. More details about the usage of "Select" action, please check the following article:

https://flow.microsoft.com/en-us/blog/microsoft-forms-tables-flow-failures/

 

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

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

 

 

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.

View solution in original post

Highlighted
slyuso
Level: Powered On

Re: Action "Get Items" select fields

Thank you, Kris I ended up with the solution you proposed.
I used Select to get 2 feilds of 20+ returned.
Also, I submitted  the idea to add $select option to GetItems action.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

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!

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 Solution Authors
Top Kudoed Authors
Users online (5,443)