cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leumas09
Frequent Visitor

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
v-xida-msft
Community Support
Community Support

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

3 REPLIES 3
v-xida-msft
Community Support
Community Support

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

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

testasdfasfsafa
Advocate IV
Advocate IV

Power Automate was promised to be a true SharePoint workflow replacement and make execs made comments about having Sharepoint as a first class integration with Power Automate  It's highly disappointing that Power Automate cannot even handle a multiple choice column properly in the filter query in the Sharepoint action.  Power Automate is NOT workflow for everyone  😞

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,979)