Hello,
quick question, is there any way to have a button do more than one thing. I would like it to run a process and set a value.
Basically, I have a button that prints a handout but it doesn't change color or anything to notify you that it has done its job. So I was thinking I could have it set a value as well to put in a check mark to verify that it happened but then it changes its state from run process.
Does anyone have any other way for this to work?
I usually make a master button that will do several "run processes" at once. Then I put the button to print the handout in a visibility region, usually at the bottom of the form, that has a visibility condition {FALSE} so that it doesn't show up to the user. Your super button can then click the handout button and mark the check box.
There may be easier ways but that's how I was shown how to do it. Hope that helps.
Both approaches are correct, but depending on the EFM file size, you may be limited to a single button.
In order to use a single button, use the RUNPROCESS type and MEL code to accomplish your task.
In the original example, the MEL would look like:
PRINT_HANDOUT(.....)
DOCUMENT.NAME = "value"
If the variable was an obsterm, it would be:
PRINT_HANDOUT(.....)
OBSNOW("name","value")
By using this approach, you can use a single button to execute most any MEL command available, such as ADD_PROBLEM, ADD_MEDICATION, ADD_FORM_COMP, even a function call. The ability to combine unlike functionality into a single button makes RUNPROCESS buttons extremely powerful.