External lookup field 422 error
I'm using this url/api call in an external lookup field.
$$HOST/attask/api/v15.0/OPTASK/search?&projectID=67cb4d760009ae6c758e61510ec421e5&name_Sort=asc&$$LIMIT=500&DE:STZWF_Interactive Type ELF={DE:STZWF_Interactive Type}&$$QUERY
and this JSON Path
$.data[*].name
When running the api call directly from a Chrome browser, I get valid data: (The value for the field DE:STZWF_Interactive Type = Banner)
API call:
Return:
{"data":[{"ID":"67cb54050015b446088449ef862574d8","name":"COX Digital Banner","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb5405001620d46deb0cb38fe7344e","name":"DirecTV Encore Guide Banner","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb54040016203d55c287c6d15877a7","name":"DirecTV Guide Banner","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb54040016207653da3d910202b1dd","name":"Roku CMF On Device Banners","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb54080015b4fd6485d1fe4f9741fd","name":"Roku CMF-on-Device Banners Multi","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb54080016216aa25e020e9b82ef59","name":"Roku CTA Banners","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb5406001621049dfa7fcb4087a5f7","name":"Roku Sidecar Banners","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb54030015b407de78a8658a964b88","name":"Verizon IMG Banners","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"},{"ID":"67cb54090016219ab501857a70e35499","name":"YouTube Primetime Channel Banner","objCode":"OPTASK","percentComplete":0.0,"plannedCompletionDate":"2025-03-10T13:16:00:000-0600","status":"NEW"}]}
However, when previewing the form or using the form I get this error, even though the drop down is populated with the correct data:
An error occurred while making a call to the mentioned API endpoint (URL: https://starz.sb02.workfront.com/attask/api/v15.0/OPTASK/search?&projectID=67cb4d760009ae6c758e61510ec421e5&name_Sort=asc&%24%24LIMIT=500&DE%3ASTZWF_Interactive+Type+ELF=Banner&Roku+CTA+Banners, Status Code: 422). Please check your parameters and try again.