Expand my Community achievements bar.

Join us LIVE in San Francisco on November 14th for Experience Makers The Skill Exchange. Don't miss out on this free learning event!
SOLVED

Fusion: How do I add just one new value to a multi-select custom form field?

Avatar

Level 1

I have an integration between Workfront and Jira. When a Workfront Project is connected to a Jira Epic, certain fields are mapped to bi-directional syncing. For example, if labels are added to the Jira Epic, those same labels will be added to a custom form in the Workfront Project (IF the label matches what we have pre-populated in the multi-select dropdown list).

The labels from Jira come through the API as an array. The problem is that sometimes a label is added to a Jira Epic that is not pre-populated in Workfront, and then Fusion treats the entire array as an error. When that happens, none of the labels (even the good ones) get added to Workfront

So, in the Fusion Scenario, I added an iterator in hopes that each label could be added separately to the Custom Form field in Workfront. This would (hypothetically) allow the good labels to be added to the form, and the bad labels to be ignored (with the "ignore" error handler). However, what is actually happening is that each good label (that meets the parameters of the pre-populated list) is completely replacing what was  previously selected from the list.

In other words, even though the custom form field is "multi-select" when I'm in Workfront, FUSION is treating the field as single-select. My hope was that each bundle that passed through without error would be added to what was already there.

 

How do I accomplish this?

 


Multi-select in the custom form configuration

Screen Shot 2023-03-28 at 10.12.41 PM.png


Multi-select when using the custom form field in Workfront

Screen Shot 2023-03-28 at 10.27.28 PM.png

 

 

 

Fusion Iterator to treat the array as separate bundles

Screen Shot 2023-03-28 at 10.30.06 PM.png

 

 

Mapping bundles (or anything) into the multi-select form field (how do I say "keep what was already there, and also add this one"?)

Screen Shot 2023-03-28 at 10.30.47 PM.png

1 Accepted Solution

Avatar

Correct answer by
Level 1

UPDATE/RESOLVED:

I worked with our Workfront Consultant, and here is how we resolved the issue.

 

  1. Went into setup > custom forms > fields tab > created a new view that includes the Parameter ID
  2. Grabbed the Parameter ID for our custom forms "Labels" field
  3. Updated the scenario routes so that first the iterator separates the array of labels, then looks in workfront  for the parameter value (of the label), and "if not found" it adds the label to the list of parameters as hidden. We needed to make sure they were added as hidden so that these new labels from Jira don't show up in the drop down menu option for Workfront users.
  4. Finally the bundles go through the route to update the workfront custom form

 

Screenshot 2023-04-13 at 1.51.36 PM.png

 

Screenshot 2023-04-13 at 1.55.17 PM.png

 

 

Screenshot 2023-04-13 at 1.55.28 PM.png

 

 

Screenshot 2023-04-13 at 1.55.52 PM.png

View solution in original post

4 Replies

Avatar

Community Advisor

The way that I handle this is by pulling in all of the current parameters, adding the new options to the parameter list, and then reposting the new list to the parameter options, so the flow looks like this.

 

1. Fetch the parameter options. The easiest way to do this in my opinion is to pull the parameter properties, and include the parameterOptions. The main reason to do this is to find out how many options are currently on the property.

2. Craft a JSON which contains parameterID, displayOrder, value, and label.

2.a. parameterID = the ID of the parameter you are updating, displayOrder = the number of current options + 1, value = whatever you want the parameter option value to be, label = whatever you want the parameter option label to be

3. Create a POST request to the URL POPT, with the JSON created in step 2 as the body

Avatar

Community Advisor

Oops, wildly misread your comment, sorry. I'm going to leave it just in case someone else also misreads it as badly as I did.  

 

On a multiselect field, you can't just make an additional check, you have to update with what was already checked, as well as what you additionally want to check.

Avatar

Level 1

It's ok! It's a crazy confusing situation I'm in. I'm working directly with our Adobe Consultant on it, and will repost the solution here

Avatar

Correct answer by
Level 1

UPDATE/RESOLVED:

I worked with our Workfront Consultant, and here is how we resolved the issue.

 

  1. Went into setup > custom forms > fields tab > created a new view that includes the Parameter ID
  2. Grabbed the Parameter ID for our custom forms "Labels" field
  3. Updated the scenario routes so that first the iterator separates the array of labels, then looks in workfront  for the parameter value (of the label), and "if not found" it adds the label to the list of parameters as hidden. We needed to make sure they were added as hidden so that these new labels from Jira don't show up in the drop down menu option for Workfront users.
  4. Finally the bundles go through the route to update the workfront custom form

 

Screenshot 2023-04-13 at 1.51.36 PM.png

 

Screenshot 2023-04-13 at 1.55.17 PM.png

 

 

Screenshot 2023-04-13 at 1.55.28 PM.png

 

 

Screenshot 2023-04-13 at 1.55.52 PM.png