Is there a limit in using AddRow for 2 tables within 1 script. I have a script where if I try and have 2 addrow commands in the same script it always errors on the 2nd one with the can not call method of add row undefined. I wanted a if statement and based on the if then add to one of 1 tables. The below is a screenshot where I’ve even taken out the if put no matter which addrow I use it gives the error. I know bot of the commands are valid as I’ve commented out each one and it works fine
I assume that the following error message will be shown when you hover over the error icon?
Cannot call method addRow of undefined
I assume that the reason for this is because the detail table OtherParties is somehow no Array anymore after executing the addRow function on the detail table Address.
I’ve just tried using addrow on another template and I’m getting the same error as you have above but this is just with 1 addrow in the script. It’s showing as uniquetag for some reason. Any ideas?
Is this the first Action Step and is it also the first Step? Will it be possible for you to share the Data Mapping Configuration file by which you’re facing this issue?
P.S. I’ve shared the issue in the meanwhile with R&D [internal reference SHARED-82108].
Are you not able to reproduce this issue by a simple Data Mapping Configuration file to which you have applied a simple data sample file too? Otherwise, I will have to ask you kindly to open a ticket on our website for this.
You first need to create a record properly in a detail table before you can add rows to it.
The easiest way is to create a dummy record with an Extraction step, and then use an Action step to replace that dummy record with proper values (using the Set() command). After that, you can use the addRow() command to add any number of rows.