Hi -
I have added a custom field "PRODUCTION TIME" on Report as Finished form "ProdParmReportFinished". This control is not datasource bound. I want to take the value of this control when the user clicks ok button. And use this value in a class which is outside scope " jmgJobBundle" and "JmgRegistrationForm".
User enters 100.00 in custom control Production Time and clicks OK.
Now I have to take that production Time Value and use it to create a route card for Production Order. This is the requirement.
THE ISSUE - I'm not able to move the value of the control from the form to out of scope classes. Can you please give me some suggestions what can be done to achieve this functionality ? I don't prefer adding a regular table to store values because that will require maintenance etc. Perhaps using args ?
Thanks
*This post is locked for comments
It seems you don't understand the difference between classes and objects. Classes are mere definitions of how objects will look like - what data they can hold and how they behave. Objects are concrete instances with concrete data (state).
If you create an object and you want to work with it somewhere else, you must pass a reference to this particular object to the place where you need it. If you create a new object, you won't see the data of other objects created from the same class, because they are completely independent.
Yes it's a other way around . I just gave you it for reference . You can use similar process to pass it from form to class.
Hi -
Your post is about passing the value from a class to forms data source. I need to pass the value from a form unbound control field to a class. It is the other way around. Will your post still work for this scenario ?
Simple web search could give you ways to solve your problem
Hi Martin -
The best way I can explain is that fo example when I use a temp table to store the value of the control on the OK button clicked(). the value is first stored in the temp table which I can see in the debugger but as soon the code is gone out of the clicked method and on to the other classes the temp table buffer is empty with no records. to me this means that the temp table is now in the out of scope class. So my question is how do I move the forms control value to the class which does not exist in the debugger path yet. I hope this gives you an idea of my issue.
I can also say yes to you question "Objects that don't exist yet ?"
Please advice
Thanks
What do you mean by "out of scope classes"? Objects that don't exist yet or not anymore? Or that you don't know how to get a reference to the object you need?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156