Expand my Community achievements bar.

Interested in getting an Adobe Workfront certification? Don't miss our AMA on June 10th, where our experts will be available to answer any questions you may have about getting certified!
SOLVED

Workfront Custom API usng status_Mod=in not working for me

Avatar

Level 2

Hoping someone can help.  I have loaded an array with the statuses of PLN and CUR and set the rest of the parameters.  I end up with the query string of

"PROJECT/search?DE:Project Release Date=2024-09-04T12:41:18.100Z&fields=ID,ownerID,sponsorID,DE:Project 
Release Date&status=CUR, PLN&status_Mod=in"

 Which looks correct, but is still returning projects in other statuses.  I am using the &status={{add(emptyarray; "CUR"; "PLN")}}&status_Mod=in to set up the status portion of the query in order to load multiple statuses into the array - no dice.  Any ideas?  thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I would try this:

PROJECT/search?DE:Project Release Date=2024-09-04T12:41:18.100Z&fields=ID,ownerID,sponsorID,DE:Project 
Release Date&status=CUR&status_Mod=in&OR:1:DE:Project Release Date=2024-09-04T12:41:18.100Z&OR:1:status=PLN&OR:1:status_Mod=in

 the key difference is listing second status using OR:1:

cheers

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

I would try this:

PROJECT/search?DE:Project Release Date=2024-09-04T12:41:18.100Z&fields=ID,ownerID,sponsorID,DE:Project 
Release Date&status=CUR&status_Mod=in&OR:1:DE:Project Release Date=2024-09-04T12:41:18.100Z&OR:1:status=PLN&OR:1:status_Mod=in

 the key difference is listing second status using OR:1:

cheers

Avatar

Level 2

Thank you Rafal!  This worked like a charm.  

Avatar

Community Advisor

Hi @marty_gawry 

after checking with Support here is another way: using a filter JSON object

 

/attask/api/v18.0/proj/search?filters={"status":["PLN","CUR"]}

 

I like this over OR: because it's concise. 

 

in Fusion (eg Search) the IN modifier will work if you pass an actual array of choices like add({{emptyarray}};CUR;PLN)

 

per support, IN in the API equates to "equals" ...