Hi
On a variable global, make with solution model, I need conect a method onDataChange with a global method.
I think is:
myglobal.onDataChange =???
How can I put a global method to the solution model variable global?
Thanks
Hi
On a variable global, make with solution model, I need conect a method onDataChange with a global method.
I think is:
myglobal.onDataChange =???
How can I put a global method to the solution model variable global?
Thanks
Hi Juan,
You can’t put a onDataChange event on a variable, only form fields have them.
However you can use a global as a dataprovider of such form field.
So check the Solution Model for the onDataChange method property of a field.
Hope this helps.
Ok, you are correct
I use a variable global as a dataprovider of such form solution model field.
I need put onDataChange event on this field but I don´t know how is the syntax.
Thanks
Hi Juan,
You need to pass it a JSmethod object.
It kinda depends on if you are working from an already existing form (with methods) or if you created the form via the SM.
But lets assume you want to use an already created global method, then you code will look like this:
var _oMethod = solutionModel.getGlobalMethod("myDataChangeMethod");
mySMfield.onDataChange = _oMethod;
But if you need to create a form method from scratch then you can use this:
var _oMethod = mySMform.newFormMethod('application.output("this is my method")');
mySMfield.onDataChange = _oMethod;
Hope this helps
Many many Thanks Robert.