Looking to consolidate child task custom form field data onto a single custom form and single field. | Community
Skip to main content
Level 2
May 24, 2023
Question

Looking to consolidate child task custom form field data onto a single custom form and single field.

  • May 24, 2023
  • 1 reply
  • 833 views

What I'm trying to do is consolidate the fields on the custom form on the children tasks into a single field (the same field) on the parent task but on a different custom form. 

 

Basically the Deliverable Email 1 and Deliverable Email 2 have a field called segments on them and I need to combine the data from both those deliverables onto a single field in the parent Email task.

So far, I've made it to the point where I can read the data that's on the child tasks, but I'm not really sure how to combine the data without losing it onto the field on the parent task. I was wondering if this would be possible using only the Workfront modules, or would Creating a CSV file in fusion then populating it with the data then pulling that data into the parent task be better? Anyways any help would be appreciated, thank you!

 

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

1 reply

ChrisStephens
Community Advisor
Community Advisor
May 30, 2023

If the field in the parent task (Email in above image) is a simple string property, you can just map the values from all the child tasks into the field on the parent task.

 

One word of caution, properties have a strict number for a maximum number of characters on a property, so it is very possible that each individual child task will be fine for character count, but the sum total will not when you try to write it to the parent, which will error out the scenario, so you'll need to factor that into your code.

Level 2
May 30, 2023

I guess I should've mentioned the field is a multi-select dropdown. I have the parent task value mapped to the child tasks but when I run the scenario it just replaces the parent task value with the last child task value to run.

Level 2
July 13, 2023

Ah ok. For multiselects, you have to include what was already checked, and then add new checks into the array. So what I would do is pull in the current array of values from the parent task, then add the new value to the array, like this:

 

add({current array};{new item})

Then make your PUT request with that new array.

 

 


Thanks, Chris I'll follow up when I've had a chance to implement your suggestions.