Workfront Custom API usng status_Mod=in not working for me | Community
Skip to main content
Level 2
September 3, 2024
Solved

Workfront Custom API usng status_Mod=in not working for me

  • September 3, 2024
  • 2 replies
  • 925 views

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.

Best answer by Rafal_Bainie

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

2 replies

Rafal_Bainie
Community Advisor
Rafal_BainieCommunity AdvisorAccepted solution
Community Advisor
September 3, 2024

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

Level 2
September 3, 2024

Thank you Rafal!  This worked like a charm.  

Sven-iX
Community Advisor
Community Advisor
September 28, 2024

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" ...