Expand my Community achievements bar.

Wondering how Workfront Proof works? Join our AMA on May 8th and ask our Community experts!
SOLVED

Issue with API Call in Scenario

Avatar

Level 4

Greetings All - I am new to API Calls and I almost have this scenario complete. However, I'm having an error message issue and don't know how to fix it.

 

Here's the scenario - I'm copying fields from one Custom Form to another. The fields are exactly the same. However, it's causing the attached error. I think it's because I'm copying it from An issue object into a program object.

Here's what I think it is...but I'm not entirely sure:

  • Verify Custom Field Configuration: Do I need to use DE:<customFieldName> instead? If so, which module would I need to update?
  • Update the API Version: Do I need a newer API version in Fusion? If so, how would I do that? Is there any documentation out there?
  • Is there another option I'm not seeing?

Thank You for your help in advance! Deborah

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Ah - in your name/value pair module, add DE:  to the value of "Field Name"
Then your scenario works fine. 

 

Couple unsolicited comments: 

  • If you want ALL fields copied you don't need to know what form they're on - so arguably you don't need the category/categoryParameter modules. 
  • you don't need the setValue #7 - you can just use the #6 output JSONstring
  • You may want to create a connection to WF that is not your user but a generic "service account" 

View solution in original post

9 Replies

Avatar

Community Advisor

Your error is in the last module - could you show the configuration? 

If you're updating a normal object with form - why are you using customAPI calls and data transformation instead of reading all parameterValues and mapping them to an UpdateRecord module? 

Avatar

Level 4

Yes of course! Please see attached. I Did want to make mention I'm taking form fields from an Issue inside a Project Queue (Program, Project, Task, Request config) and pasting it into a designated Program with a different form, but the same fields. 

 

Please see attached. TY Deb

Avatar

Community Advisor

Hi Deb,

all is good in that module since you're using the JSON generated in module #7. 

Yes I would first try and use DE: for the custom fields.

 

Second I would try to get the Issue/Request with "parameterValues" (added to the list of fields to return) and map them to the program form. 

In the case you want to stick with what you have, try the DE: addition first, if that fails lets' see the JSON object? 

 

Avatar

Community Advisor

Hi @DeborahLeigh123 did you get this resolved? 

Avatar

Level 4

Greetings. Not quite yet. I was unable to find anything missing that you suggested. I put together all the fields to show you I was calling parameterValues and DE: Do you spot anything unusual in there? I attached an image. TY

Avatar

Community Advisor

Looks ok at first glance. 
What's the JSON look like?

Avatar

Community Advisor

BTW you can jsut do this: 

convert the parameter values to JSON and put them into the PUT customAPI call. I'll recreate what you're doing to see what happens

SveniX_0-1744141195383.png

 

Avatar

Correct answer by
Community Advisor

Ah - in your name/value pair module, add DE:  to the value of "Field Name"
Then your scenario works fine. 

 

Couple unsolicited comments: 

  • If you want ALL fields copied you don't need to know what form they're on - so arguably you don't need the category/categoryParameter modules. 
  • you don't need the setValue #7 - you can just use the #6 output JSONstring
  • You may want to create a connection to WF that is not your user but a generic "service account" 

Avatar

Level 4

@Sven-iX You're the GOAT! TYVM for your time. your solution to add DE: was the golden ticket. 

I actually do need the entire string because it will be pasting into a different custom form. So, keeping the original string is correct.

 

Thank you very much! Deborah