SharePoint Designer CALL HTTP filter by choice field
-
07-01-2021 - |
Question
In SharePoint Designer, CALL HTTP web service, is there a difference between filtering by single line of text vs. choice?
I'm trying to filter the columns [ScheduleType]
and [AccountStatus]
, which are both choice fields.
I found another post that suggests using filter=fieldNameValue
and expand=fieldName
but it didn't work in SPD. Part of the workflow is to log a count, and it keeps logging 0 but it should return 15.
Below is my call http, the settings work on another filter using single line of text column but it doesnt work when I changed the filter conditions:
La solution
You don't need to expand choice fields, suing ?$filter=FieldName eq 'value' should be enough to request your items.
example:
`https://mysyte//_api/web/lists/getbytitle('listtitle')/items?$filter=MyChoiceField eq 'value'
you should test your query on chrome or other browser to view if your query is getting results.
if you are able to get results, then the problem is on your rest call on SPD
Choice fields should behave just as single line of text as long as they are not lookups