Can i copy a record.detail.field value to another?

I all,

Today’s question : Can i copy a record.detail.field value to another record.detail.field within the datamaper ?

Thank you.

You can, but only inside the same main record. So you can copy values from one detail line to another (and even to another detail table), as long as you are still inside the same master record.

This functionality was introduced in OL Connect 2021.1, through the set() method. Read more about it in this online help page.

Thank you Phil,

I can’t use this solution cause i’m still in 2020.1. I’ve tried a simple way using data.extract(‘monchamp’) but a field cannot be extracted twice. I’ve also tried something like sourceRecord.tables.table1[steps.currentLoopCounter].fields.field1 = sourceRecord.tables.table1[steps.currentLoopCounter].fields.field2 but tha’st not right. Is there another way ?

Thanks

You won’t be able to do it in the DataMapper alone.
You will have to extract your data and retrieve the extracted values in Workflow (using the Retrieve Items task). Then you will have to use a script to modify those values and finally you’ll be able to update them in the database using the Update Data Records task.

Thank you Phil,

That’s not a very simply way. I thought that it could be simplier to copy a field on the same record detail .

You’re right… and that’s why we implemented it in 2021.1 !!!

1 Like