Using AddRow with 2 different tables in 1 script

Hi

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

Visualy it looks legit, can you share your Template and anonymized Datamapper?

Hi @jbeal84,

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.

Example:

Hi,

I’m not sure to be honest as I’ve done it a different way now, but I’ll have make a quick test and let you know

James

Hi

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?

Hi @jbeal84,

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].

HI Marten

Could you send me a link to upload the file as it’s not very easy to anonymize the data. My email is james.beal@unifiedpost.com

Thanks

James

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.

Hi

Yeah I’ve been able to replicate the issue, please see the attached

JamesLineMode.OL-datamapper (5.9 KB)

Has this issue been resolved? If so, could someone share the solution of it? Because I’ve met same issue.

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.

See this Sample data mapping config (4.5 KB) .

Hi Phil
I could reach the solution of this issue. Thank you for your kind support.