16
Views
10
Comments
Database Table import from Excel

Hi,

i am developing Quiz app, where i imported entities from excel.

there are 2 entities one Answer entity with (Id, Answer, QuestionId) attribute & another one is Questions entity with (Id, Question) attribute.

but on reference attribute QuestionId, getting all 0's on aggregate.

please help me here.

attached issues img.

Rank: #295

Hi Shital,

We did not get any image, could you please send it again?

Hi Shital!

Could you share the fields in structure you use in  the Record Definition 

 , and the assignment to the QuestionId 

regards

Graça

Rank: #295

Hi Shital,

Take a look at the solution of below discussion link . It may solve your issue.

https://www.outsystems.com/forums/discussion/34133/excel-import-and-add-a-foreign-key/

Let me know, if it works

Thanks :)

Hi shital ,

Here QuestionId is created dynamically in the database that's why you getting all 0's in that attribute field.

Thanks,

Samiksha

Rank: #295

Hi Shital,

Here  i have attached an oml file, look how i implemented BootstrapTwoEntities Server action which is scheduled to run on WhenPublished.

 

You just need to create Answer entity with (Id, Answer, QuestionId) attribute & another one is Questions entity with (Id, Question) attribute just as we do in normal case. Implement the same action as given in oml and run this action using timer on WhenPublished as follows.

This steps will import data in both entities with the referenced attribute too.

Hope this helps, Thanks and Happy Coding :)

ImportReferencedEntity.oml