BatchInsert is inserting only first row to table

Hi,

I am using BatchInsert adapter service tin my flowservice o insert multiple rows to DB table at once, I have mapped document list as input to batchInsert, but Its inserting only first row from the Document list. I can see more than one row in the input doc list, but batch insert inputs is taking only first row and hence the batchresult is 1. Can someone please let me know what I am doing wrong here?

Thanks,
Suma

The error is in the map. When directly setting a column it forces it to be a single entry – the [0] entry in the list.

Don’t combine the call and the field mapping. Map the “inputs” doc list separately. Loop over timesheetRows and create the inputs list. Then map the inputs list to batchTimesheetInsertE1Input/inputs.

Edit: I see a step that is converting date string format, and the adapter service accepting a string. I would recommend changing that – have the adapter service accept a date object. Then convert the date string to a date object and pass that. Avoids dependency on the “default date format” of the DB.

2 Likes

Thank you so much! It works!

1 Like

Affirmative, it really work. Thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.