Fill attributes of an entity by consuming an excel file
Application Type
Traditional Web
Service Studio Version
11.50.12 (Build 48992)

Hello everyone,

so basically i have an entity that most of the attributes are filled through a form. Some of the attributes are left blank and only filled in later through another form. It made sense to save everything on the same entity. 

On the second form we also have the option to fill the missing attributes for each product via bulk. So they download a pre-made excel template with the missing attributes and they fill in the details for each product.

Each product has its own product code. So what i want to do is to add this bulk information into the entity and into the respective product. 

I created a structure that matches de excel template. Also all the excel columns match the entity attribute names that we need.  Below is what i am doing but unfortunately data is not getting saved into the entity. Any help would be appreciated. Thanks

mvp_badge
MVP

Hi @Lourenço Matalonga ,

But in this action where is Create or Update action of entity?

Right, that is a very good point. But is the big assign correct?

Will add the update action of entity and see how it does.

Thanks


mvp_badge
MVP

Hi ,

You need to update the record one by one  so need to put update action in loop.

assignment you need to check as your requirement. 


Hi @Lourenço Matalonga ,

What you could consider is to use a BulkInsert if there are a lot of records to create or update. https://www.outsystems.com/forge/component-overview/1117/bulkinsert You can get the name of the table you want to insert the data to with the enitity.SS_Key (this key stays the same over every environement like DEV TST and PRD). 

Then you can make a local list of entity records and give that to the BulkInsert action together with the table name, retrieved like described above.


Let me know if you have any questions!

Kind regards,

Tyler

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.