You can perform basic create, read, update, and delete (CRUD) operations by using the Representational State Transfer (REST) interface provided by SharePoint. The REST interface exposes all the SharePoint entities and operations that are available in the other SharePoint client APIs. One advantage of using REST is that you don’t have to add references to any SharePoint libraries or client assemblies. Instead, you make HTTP requests to the appropriate endpoints to retrieve or update SharePoint entities, such as webs, lists, and list items.
If you have a requirement to select a taxonomy field from SharePoint Designer workflow using Call HTTP action, it is not a straightforward approach. The below article is going to talk about few workarounds for this problem.
Note: Job Title is a Taxonomy field.
Problem 1 – Select query will not return Taxonomy Term Label
Problem 2 – Filter query can not be applied against the Taxonomy field.
Solution 1 – CAML Based REST Call
The following POST query help you to get the necessary results but the problem with this approach is we can not call this REST Endpoint from SharePoint Designer workflow as it contains curly braces and curly braces are used as tokens in SharePoint Designer.
Solution 2 – Query Taxonomy field value using GUID associated with the Taxonomy TextField
This will be a 3 step process
Step 1 : Get the TextField(hidden note field) value of the Taxonomy Field
Execute the following REST call and note down the TextField value from the REST response
Step 2 : Get the InternalName of the TextField
Pass the GUID of the TextField received from Step 1 in the below REST Call and get the InternalName of the same
Step 3 : Get the Taxonomy field value passing InternalName as shown below
Applying filter against this internal field also leads to the same problem
“The field ‘g9d8145fb42b43f59dd422adf7bbb575’ of type ‘Note’ cannot be used in the query filter expression. ”
A workaround will be to create an additional single line of text field in the list and populate the same with taxonomy field value and use the same to apply filter as shown below
https://yourtenant.sharepoint.com/sites/dev/_api/web/lists/getbytitle(‘Employee Details’)/items?$select=g9d8145fb42b43f59dd422adf7bbb575&$filter=ExtraField eq ‘CEO|6c47210d-44d3-496e-82a3-aaac11a3b94b’