I see this is your first post. Welcome to the Servoy forum
I assume you want to call a method from another form from your button?
Any event on a form (be it a form event or an event on a form element) can only be linked to it’s own form method, global method or a foundset method (the foundset used on the form).
So if you try to link a method from another form to your custom button then this won’t work.
As a workaround you can create a form method on your form that triggers the other form method like so:
Thanks for the welcome! took me a while to get the nerve up to post - I am a Servoy newbie.
The error is gone but the method is still not firing when I click the button. The debugger shows that the function aa is linked to onAction but the method is never called. BTW when I put the method in globals it works without issue.
sarar:
Thanks for the welcome! took me a while to get the nerve up to post - I am a Servoy newbie.
We were all Servoy newbies once.
Just remember there are no stupid questions, only stupid answers. So I hope I don’t give stupid answers.
sarar:
The error is gone but the method is still not firing when I click the button. The debugger shows that the function aa is linked to onAction but the method is never called. BTW when I put the method in globals it works without issue.
Yes, I see I forgot to add some parenthesis in my example code (apart from not giving the function a name, which you already found out I see ).
forms[‘itemadd_dtl’][‘showmultipick’] will only give you the function object, it doesn’t execute it. Adding () at the end will execute it.
So your code should be like this: