External lookup field 422 error | Community
Skip to main content
Level 3
May 21, 2025
Solved

External lookup field 422 error

  • May 21, 2025
  • 1 reply
  • 516 views

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:

 

https://starz.sb02.workfront.com//attask/api/v15.0/OPTASK/search?&projectID=67cb4d760009ae6c758e61510ec421e5&name_Sort=asc&$$LIMIT=500&DE:STZWF_Interactive%20Type%20ELF=Banner&$$QUERY

 

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by skyehansen

oh that makes sense. It would be a syntax error on your last command then, and that might not show up in a straight API call since there's no way to query there.

 

I'm not sure if you're aware of what query does, so as a reminder:

https://experienceleague.adobe.com/en/docs/workfront/using/administration-and-setup/customize/custom-forms/design-a-form/external-lookup-examples

 

It's used as a way to "dynamically filter" which is a fancy way to say "this will act like a typeahead". Because it's a filter, you do see it in the link above, as always being prefaced by the thing it is filtering. e.g. description = $$query, name = $$query... you hopefully get the picture there...

1 reply

skyehansen
Community Advisor and Adobe Champion
May 21, 2025

I'm wondering if it's an issue with your custom field stuff. Can you run a quick test and take off everything after "500" and see if you still get an error?

 

If the error disappears, can you rename that first custom field name so that it doesn't have an underscore?

Level 3
May 21, 2025

I didn't get the error after removing everything after 500.  So I tried renaming the custom field with only alphanumerics and that still errored.

On another note, when I remove the &$$QUERY I don't get the error and everything seems to work correctly.

skyehansen
Community Advisor and Adobe Champion
skyehansenCommunity Advisor and Adobe ChampionAccepted solution
May 21, 2025

oh that makes sense. It would be a syntax error on your last command then, and that might not show up in a straight API call since there's no way to query there.

 

I'm not sure if you're aware of what query does, so as a reminder:

https://experienceleague.adobe.com/en/docs/workfront/using/administration-and-setup/customize/custom-forms/design-a-form/external-lookup-examples

 

It's used as a way to "dynamically filter" which is a fancy way to say "this will act like a typeahead". Because it's a filter, you do see it in the link above, as always being prefaced by the thing it is filtering. e.g. description = $$query, name = $$query... you hopefully get the picture there...