What is the best way to have 2 versions of a data grid/data master

kakuda shared this question 7 years ago
Answered

Hi,


I have a screen for an item. This item has subelements, which I organized in a data master and display it in a data grid.


Wenn I open an existing item, the table with the subelements is shown.


When I open the same screen for creating a new item, the table with the subelements is shown as well. What would be the best way to show an empty subelements table?


The only idea I have: Having two data masters (same attributes, one with, one without example data) and having two data grids (one for the filled, one for the empty data master). I don't like this idea very much, because there is no re-use.


Thanks.

Comments (2)

photo
1

You can create an on page load event that hides or shows the table when a certain variable is filled. Then fill that variable when you want to show the screen without the table. If you really want to have the table but empty what you must do is an on page load event and then select the 'set value' action, select the data grid and leave the value blank.

photo
1

Thanks for the tip!


I tried the second solution: on page load / set value / data grid / empty. But of course, after I added a new row, all rows are visible.


That's why I tried an other way: on page load & on save / set value / data grid / filter (do not show old elements, which have a special mark.)


That solution is excellent for me!