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

SharePoint Get items filter query choice

Hello everyone,

 

I don't manage to filter the get items sharepoint action on a choice field. I'd like to filter my items on the field 'TaskOutcome' with the value 'Not Started'

 

Here a part of the json :

 

"value":[
      {
         "@odata.etag":"\"1\"",
         "ItemInternalId":"30",
         "ID":30,
         "Title":"BAP Tech; ZZ-DEMO VIA; FOUR DEMO; REF : IT15",
         "AssignedTo":{ },
         "AssignedTo#Claims":"i:0#.f|membership|xxxx@xxxx.com",
         "TaskOutcome":{
            "@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
            "Id":0,
            "Value":"Not Started"
         },
         "TaskOutcome#Id":0,
         "WorkflowItemId1":2812,

 

 

I don't manage to filter on "TaskOutcome" or "TaskOutcome#Id".

I know that I can achieve this by getting all items and then filter via a each action and a condition, but i'd like to do it via the filter for better performance.

 

Do you know if it can be done ?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: SharePoint Get items filter query choice

Hi @leumas09,

 

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

Do you want to filter items of your SharePoint list based on the Choice column value?

Do you want to use OData Query to filter items within the "Get items" action of your flow?

Further, could you please show a bit more about your issue?

 

I have created a SharePoint list on my side and the data structure of it as below:13.JPG

If you want to use OData Query to filter items within the "Get items" action of your flow, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

The OData Query is not supported for Choice column of a SharePoint list in 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

 

In addition, you could consider take a try with the following workaround:14.JPGWithin Filter array action, From set to output of the "Get items" action, within condition box, left input box set to TaskOutcome Value dynamic content of the "Get items" action, right input box set to Not Started, middle drop down set to is equal to.

 

Or you could click "Edit in advanced mode", type the following formula:

@equals(item()?['TaskOutcome']?['Value'], 'Not Started')

15.JPG

 

The flow works successfully as below:16.JPG

 

 

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: SharePoint Get items filter query choice

Hi @leumas09,

 

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

Do you want to filter items of your SharePoint list based on the Choice column value?

Do you want to use OData Query to filter items within the "Get items" action of your flow?

Further, could you please show a bit more about your issue?

 

I have created a SharePoint list on my side and the data structure of it as below:13.JPG

If you want to use OData Query to filter items within the "Get items" action of your flow, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

The OData Query is not supported for Choice column of a SharePoint list in 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

 

In addition, you could consider take a try with the following workaround:14.JPGWithin Filter array action, From set to output of the "Get items" action, within condition box, left input box set to TaskOutcome Value dynamic content of the "Get items" action, right input box set to Not Started, middle drop down set to is equal to.

 

Or you could click "Edit in advanced mode", type the following formula:

@equals(item()?['TaskOutcome']?['Value'], 'Not Started')

15.JPG

 

The flow works successfully as below:16.JPG

 

 

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

leumas09
Level: Powered On

Re: SharePoint Get items filter query choice

Hello Kris,

 

You perfectly answer to the question, I was afraided that the odata filter currently not support choice field. Thanks for the workaraound. it's working well.

 

Thanks

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: 316 members 3,664 guests
Please welcome our newest community members: