Formatting an array for a People column

Hi,

I’m trying to add all of the people assigned on a Monday.com board to either of two different People columns to a third People column when the assignments take place, so that they’ll display together in a chart and calculate sums properly elsewhere.

My scenario sends the content from each of the People columns to an Iterator which feeds a Data Store module which creates unique records of the ID and Kind details from each assignment.

In the last few steps, the records are retrieved from the Data Store and run through an Array Aggregator before the final step, an Update Column Values of a Specific Item module which sends the details to the final People column on Monday.com.

Things go pretty smoothly until the last two steps. I’m don’t know how to get the Array Aggregator and Monday module to properly format the output from the Data Store module to update my Monday item. It looks like the Array Aggregator is formatting the array with an undesirable extra tier of Collection (circled in the screenshot) causing the Monday module to throw this error.
[ Error Code: ColumnValueException / Error Details: {“column_value”:“{"personsAndTeams"=>[{"data"=>{"ID"=>17685360, "Kind"=>"person"}, "id"=>nil}, {"data"=>{"ID"=>12942589, "Kind"=>"person"}, "id"=>nil}]}”,“column_type”:“MultiplePersonColumn”} ]

Here are my Array Aggregator and Monday module settings:


Am I making the right assumption about the array formatting (that Monday doesn’t like that extra level of Collection)? If so, how can I address that?

Any advice is welcome. Thank you!

UPDATE! If I pull the Array from the wrong module (just to test a hypothesis), I can make the final module successfully update my board! The successful output uses the Array/Collection arrangement as I suspected would work, dropping that extra collection, “data”.

I need to check this throughly, Can you quickly try this,

map(arrayfromaggregrator;data)

1 Like

Runcorn, thank you very much for your response!

I added your suggestion in the final module as seen here and the output now formats properly.

However, it is still creating two separate Operations as seen here.

This means that instead of two assignments being added, the first assignment is added then the second assignment overwrites the first.

Do you have any advice on getting the two Operations/Bundles/Arrays into one?

I’m much closer to my goal now, though! Thank you for your help!
-Greg

Can you share the screenshot of how it looks like? Seems like there is some module that is returning more that one data causing the issue.

1 Like

I think I fixed it since my last post.

As you suggest, there was an iterator module that was breaking the Data Store output into multiple bundles. I’ve removed that and the array now includes all the bundles.

I’m testing the process now by adding and subtracting multiple people to both columns and it looks good.

Thanks again for your help! I’ll label it the solution as soon as my tests prove out.

2 Likes