hi all,
I have passed a checkbox value in form -button clicked method as below:
classname::getMethod(UnapprovedReq.checked(true)));
UnapprovedReq is my checkbox name in form design.
In class method, I have declared as
public static getMethod(Noyes _noYes)
i'm getting error as "Parameter _noYes must have a default value"
anybody please help me how can I retrieve the checkbox value on class which is passed from Form Button click method.
*This post is locked for comments
What exactly did you try ? Probably it's a good idea to share your code because it's hard to understand what is wrong without it.
Hi,
The class method to which I'm passing the value from form, has many other parameters like datevalue, containers and my checkbox value. So Public static has been used. And Class.run() is called in this method only.
hence I'm not able to call run() from the form.
so I wanted to know how to retrieve this checkbox value in class method.
I tried with Boolean but it didn't work.
Hi Lakshmi.ch,
I have not seen this error before, can you explain what exactly are you doing ?
I'm not quite sure why do you have static method. I think you need to declare a variable in classDeclaration method of your class:
public class MyClass { boolean isChecked; }
Then you need to create parm method
public boolean parmIsChecked(boolean _isChecked = isChecked) { isChecked = _isChecked; return isChecked; }
and then in a button click instantiate new intance of the class and pass value of checkbox to the parm method:
void clicked() { MyClass myClass = new MyClass(); //instantiate super(); myClass.parmIsChecked(UnapprovedReq.checked()); //pass value
myClass.run() //do something }
You don't need to pass "true" to UnapprovedReq.checked() because it will set a value of checkbox.
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,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156