I need to create a button that will run a process that includes clicking other buttons. I thought someone had already asked this, but I couldn't find it in the forum. And, I was hoping that something had changed.
Is there a MEL command to click a button? I would rather not have to create two buttons in order to run a process and click another button.
Thanks for your help. -Robin
Unfortunately there aren't any direct MEL commands that I am aware of. As you mention there are workarounds using multiple buttons and other tricks.
Brad
Robin, can you provide more details on what you trying to accomplish? It would seem to me that you could write a function to carry out the desired actions when the first button is pushed eliminating the need to have a second button. Are you familiar with using the "RUNPROCESS" connection type for buttons? Perhaps I'm missing something here?
Could you just have you second button include the exact same process from Button # 1?
For example:
Button # 1 Runs Process A
Button # 2 Runs Process B then Runs Process A
Or as Greg already mentioned, have Button # 2 call a function that does both Process A or Process B.
It is possible to do what is desired, however one must remember that they 'set it up' in the manner I am about to describe:
Each button 'action' is converted into a MEL function in the XLT or XLW. Technically, you could reference the function name defined in the file and it would trigger as desired.
The issue is that if the form is re-saved, the function name typically will change forcing the developer to remember to update it (sure, we never forget things like that even when we put notes in the form). 🙂
The recommended method is to create a button using set values and 'hide' the other button if desired. If both buttons are set to runprocess, then you might need to create a third button. Unless space on the form is an issue, having hidden buttons (in a visibility) is not really a big deal overall.
Good Luck!
Thanks for the feedback. I think I'm going to have to create a page with hidden buttons. I'm creating an extensive form that will add orders and problems, run a process, and set values, with only one click for the user.
-Robin
Way too complicated suggested. Use SetValues connection in Action Button, simple. If you need more details, contact me, [email protected]
Thank you everyone. I've been programming with MEL for almost 10 years now, so I do know what can be done with RunProcess and SetValues. Unfortunately, if there is still not a command to 'click' a button, then I will have to do a work around. I need to do some steps with the RunProcess that cannot be done with the SetValues option. I was just hoping that a command had been developed that I was not aware of. Thank you anyway. -Robin
Thanks, Lee. Since I create forms for clients, and then hand them off, that 'remembering' thing tends to be a problem. -Robin
Robin,
I found something you might want to look into. There is a different form builder called Clinical Forge that might provide the feature you are looking for; I've included a screenshot of the help file related to buttons below:
Here is their website (you can get a free 30 day trial):