Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!

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

Avatar

Level 2

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.

Travis_Young_0-1684972372151.png

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!

 

4 Replies

Avatar

Community Advisor

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.

Avatar

Level 2

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.

Avatar

Community Advisor

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.

 

 

Avatar

Level 2

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