Forums
Lawson Design Studio
OnClick Question
Author
Messages
Chris12
Veteran Member
Posts: 150
1/16/2014 8:39 PM
I have a screen in DS which contains multple buttons. I would like to have multiple onClick events (one for each button) ....
How do I segrate the onClick events such that each button knows what OnClick function to use ...
This one is killing me
Robert Spurr
Veteran Member
Posts: 130
1/16/2014 8:48 PM
the OnClick button has a variable call 'id'. Every object in design studio is assigned an 'id'. For buttons it will something like 'push7'. All you need to do check the the 'id' to determine the action you want to take.
if(id=="push7")
{
//Do something
}
Chris12
Veteran Member
Posts: 150
1/17/2014 12:04 AM
Thanks Robert ....
But how to a link the button to the function ....
It seems when I click the button (ie push 7) it does nothing
Terry P
Veteran Member
Posts: 234
1/17/2014 12:32 AM
With the button you're trying to use, click on the Properties for it. You'll see at the bottom "Action". When you open that, then typically you'll click the radio option for "Function". When you do that, all your custom functions are listed. Create a function you want to execute when the button is pushed.
Chris12
Veteran Member
Posts: 150
1/17/2014 12:38 PM
Thanks all .... in my if statement I only had "=" and not "==" ....
Thanks so much