Advance Data Management - Inserting multiple rows into a CDT

Dear all,

I am having some trouble getting data to save from my form into two separate CDTs because one of the CDTs is receiving multiple rows at the same time and needs the id from the other CTD.

In my form, I have two inputs (different CDTs) as explained below:

CDT 1) (Single item)
Cash Advance
-----------------------------
id,
requester,
date,
category,
subCategory,
department,
justification,
priority,
type,
onBehalfOf,
currentStatus,
totalRequested,
totalApproved,
attachment

CDT 2) - (Multiple items)
Request Line Items
---------------------------
id,
cashAdvnaceId,
itemName,
amount,
qty,
total

The first CDT captures information about the entire case.

The second CDT collects a number of rows (using the editable grid - multiple items).

After the form in submitted, I use a “Write to Data Store Entity”.  I first save the fields into the first CDT and obtain the autogenerated id (using the output) because I need the id to insert into CDT 2. this part is working ok.

I will then need to pass the id field from CDT 1 to each of the cashAdvnaceId fields in CDT 2. CDT 2 has many rows (depending on how many rows the user created in the editable grid). I have a second "Write to Data Store Entity" I am trying to configure for this and having issues with the fact that there are multiple rows that I need to pass the id value from CDT1 into.

Thanks in advance

  Discussion posts and replies are publicly visible

Parents Reply Children