Hi,


I have the following scenario:

1. User uploads an Excel File with 4 Columns.

2. The Data gets stored in a structure.

3. I then perform Validation on it and Insert it into a table using Bulk Insert.

My Problem is that along with inserting the data from Structure, I want to insert one more column (System Generated ID) for each record but I am unable to figure out how to add the same to the List being passed to the Bulk Insert Server Action.  

Does anyone have a work-around for the same?


Regards,

Rushabh Shah

Solution

Hi Rushabh,

Please find attached OML for your reference. You can modified logic accordingly. Let me know if it works for you.


-Hitesh- 

Solution

Hi Rushabh,

Assuming the bulk insert Action has an input that's a List of Entity Records, and your input is a List of Structure which is (fairly) compatible with the Entity Record List, you can specify your Structure List as input to the Action, mapping all attrbutes that are in both, and then specifying for the one Attribute that's not in the List (the generated ID) a Function like GenerateGuid(). This will add the generated ID to the Attribute.

Hitesh Maran wrote:

Hi Rushabh,

Please find attached OML for your reference. You can modified logic accordingly. Let me know if it works for you.


-Hitesh- 

Hi Hitesh,


Thanks. We implemented a logic similar to this one.


Regards,

Rushabh Shah


Hi Rushabh,

Though Hitesh' method works fine, if you actually have/had an Action that does the bulk insert, my method is preferable.

Also note that what Hitesh' shows in their eSpace is really, really basic OutSystems programming, so if you have difficulty of coming up with something like that yourself, you might want to revisit the training material.