In Video D24 it demonstrates how to Add a new record to a grid using a dialog component.
But if the grid is a child of another grid your dialog will have a field in it that is the new record's linking field to the parent grid record.
This field needs to be populated automatically as it is not know by ther user. Is there a way to auto populate this linking field using the new dialog Add/Edit action?
I've tried using an argument in the dialog and setting the argument value to to the admid field in the action button but it only seems to work if there are other records in the Operation Report grid. In the attached picture you can see the Operation Report grid (purple) is a child of the Admission Grid (Red). You can also see that when I launch the Operation Report dialog (purple) to enter a new record the AdmissionID field is set to 0 but I need to auto set it to the AdmissionID value from the parent grid (AdmissonID value is 11 in the attached pic).
Given A5 is all about linked components it seems odd that this new action would be made available without taking this into account and making it easy, like A5 does so well.
Interestingly if you use a Detail View New Record link in a grid the linking field (AdmissionID in my case) is auto populated, so again I'm thinking there must be an easy way for the dialog to auto populate this too but I can't find it!
GridDialogOpRpt.jpg
Thanks in advance
But if the grid is a child of another grid your dialog will have a field in it that is the new record's linking field to the parent grid record.
This field needs to be populated automatically as it is not know by ther user. Is there a way to auto populate this linking field using the new dialog Add/Edit action?
I've tried using an argument in the dialog and setting the argument value to to the admid field in the action button but it only seems to work if there are other records in the Operation Report grid. In the attached picture you can see the Operation Report grid (purple) is a child of the Admission Grid (Red). You can also see that when I launch the Operation Report dialog (purple) to enter a new record the AdmissionID field is set to 0 but I need to auto set it to the AdmissionID value from the parent grid (AdmissonID value is 11 in the attached pic).
Given A5 is all about linked components it seems odd that this new action would be made available without taking this into account and making it easy, like A5 does so well.
Interestingly if you use a Detail View New Record link in a grid the linking field (AdmissionID in my case) is auto populated, so again I'm thinking there must be an easy way for the dialog to auto populate this too but I can't find it!
GridDialogOpRpt.jpg
Thanks in advance
Comment