UPSERT transformer

I have a transformer that bulk upserts data, the ID being custom with two values pasted against eachother.

It should look like this for every record:

But when selected multiple it takes all the ID's

How can I select only the one module ID for this?

Thanks!

Hey @FlorVk!

It looks like you're attaching the full moduleId array to {{overzicht_filter.value}} instead of iterating through each item. You might try doing something like this instead:

updates.forEach(record => Object.assign(record, {"customer_id": customer_id, "id": customer_id + record.module+id}));

Or, if you want, you could even do:

const createCustomId = (row) => {{overzicht_filter.value}} + row.module_id;
updates.forEach(record => Object.assign(record, {"customer_id": customer_id, "id": createCustomId(row)}));

Do either of those work?