Notifications
Announcements
No record found.
Hi all ...I am just trying to send a string from Form1 to Form2 by clicking on button on Form1after I make some search on the internet, I found this approach that sending and opening the Form2about me I don't want Form1 open Form2 because Form2 already opened, and I want Form2 receive the value automaticallyHelp please.
If you Form1 has a reference to the FormRun object of Form2 (e.g. because it was open from Form1), you can simply calls a method of Form2 and pass the value there. If you just have two forms that aren't aware of each other, the task isn't easy and you should rather come with a different design.
Note that it's not "Args class issue" in either case, therefore you should rather update the title of this thread.
In addition to Martin comments, it seems that you are using string control for both the forms, So its not possible to pass value from first form to second form if it is not called from the first form.
If the string control is table level field you can update the string value entered in form 1 table to form 2 table. But you need to press F5 to see the data in the Form 2.
Thanks,
Girish S.
thanks Martin for your response and I changed the title of this thread. Yes, the two forms don't relate to each other so what is the design that I should to have?
Thank u Girish Your response was helpful
Well, how do you intend to determine which form your want to update? I can have multiple instances of Form2 running (or none). And you don't have a reference to any of them.
Let's let's forget implementation details for now. Instead, tell us what business requirement you're trying to implement.
Ok I have a form with a grid that read a one row of data from a DataSource, in this form there is a button when I press it a new form is opened this form contain:
1- string edit value that comes from another DataSource
2- OK button
So, when I press the OK Button the value in the string edit must be passed to a field in a DataGrid of the main form.
I hope that is clear
That sounds easy. You should be able to get a reference to the main form by calling element.args().caller().
ok martin now if I get the caller of the parent form how can i pass for example a string value from child form to the parent
can you give me some lines of code please
You can use a method and pass the value through a method parameter. For example:
FormRun callerForm = element.args().caller(); callerForm.myMethod(strEdt2.text());
thanks a lot..
it is done
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 664 Most Valuable Professional
André Arnaud de Cal... 522 Super User 2025 Season 2
Sohaib Cheema 303 User Group Leader