Insert several data in one table at a time

1

Good morning guys. I am working with Genexus 15 with JAVA and I come again with another question and that is that I want to create in a Web Panel a grid similar to this one.

Which allows me to enter several data in a table with a single button and if I could do it without having to insert the code of each data that I am entering. This is my table.

I understand that it is with a Grid, but I do not know how to put it in my Web Panel, if with variables or attributes and how to insert a new line.

I hope I do not cause discomfort. Greetings.

    
asked by Angel Cayhualla 28.03.2018 в 01:53
source

1 answer

1

What you are trying to do is make a WebPanel an Insert for a 2-level transaction. I regret to say that for this it is very complicated to control the theme of the grid, since you must control some things. Of which you should consider.

  • You must work with varials.
  • The grid does not have a navigation, it will generate a single row and it will not work for you assigning rows to it.
  • You should generate procedures that help you with the insert to the base, for the parent transaction and the for each line of the grid that you must sweep to generate each insert of the child.

As you can see it is cumbersome, since you may have to resort to SDT's to store the data briefly.

My recommendation

Use a Transaction , these were created to work at a hundred the CRUD of your entities. In case you can not model the Form of the transaction you already have, just save a new one from it, as you do:

  • You open the transaction.
  • Right click on the tab of it.
  • Save As ...
  • The name you want. And ready.

This is a copy of the transaction you already have (student), but this is going to be done as your personalized form for a certain situation. And in it if you can handle the Grid and commit events and others at your whim.

I hope I have guided you on the right path and that it will help you more than anything to clarify that in this type of situation you must use transactions. Greetings.

    
answered by 28.03.2018 / 16:51
source