Announcements
Hello There!
I ve got a problem with data. I have to transfer data from Form to Dialog. Any Ideas?
Thanks for your help!
*This post is locked for comments
Hi
What do you mean with "data"?
Can clarify better your requirement?
Hi,
Sorry. I' ve got two forms and one dialog. I have to transfer one record from data source in Form A to Form B. Later, I need transfer this record transfer to Dialog. Transfer between forms is done. But I cant do the same with dialog.
Thanks.
PS. Sorry for my last post, but this is my first visit on this page :)
One common scenario that fits your description is to click on a menuitem button to perform certain action and a dialog prompts for user to enter parameters. In that case, in the Main method of the target class you can make use of the "args" parameter.
args.caller() -> the caller object (in this case, the caller form)
args.record() -> the record selected in the form datasource when the menuitem button is clicked.
args.record().datasource() -> get you the form datasource instance.
If you are looking at a different scenario, can you elaborate?
Kind regards,
Dominic Lee
Have a look at standard class ProdJobUpdate, main method.
Wow I missed a lot during typing. =]
If you have the record buffer in Form B, you can create a method in form B that would return that record.
Then in Dialog, you go:
Object callerForm;
MyTable myTable;
callerForm = args.caller(); // callerForm now contains a reference to Form B
myTable = callerForm.parmMyRecord(); // parmMyRecord() returns the record buffer
you need to use Args object to fetch the data from Form to Dialog
Args object in Dialog will have method called Args.Caller() which basically will give you the object of caller form and once you have the Form Object you can call any method on the form.
May you need to create some method on the form which will return the required data which you need to pass from Form to Dialog
Please verify and let me know if this details helps you.
Thanks Everybody for your help ;)
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sanhthosh.Kumar.K 2
Raed Salah Bzour 1