Hello,
I have another MEL question.
Are there any triggers that can be setup that only fired when the document is being signed?
I.E. When signed perform {}
You can have functions run when the page is closed. So when your user signs the document you will get the same effect. The problem is your code will run in several other circumstances:
If you have multiple pages/tabs on a form and the user clicks between them
If you have multiple forms and the user clicks between them
If the user puts the visit on hold
It would be great if there was an event handler just for document sign. However, right now you have to weight if having your function(s) fire in the additional circumstances is acceptable.
Brad
We have looked very hard for this capability. No one I've spoken to knows how to accomplish it. GE has told us that they didn't approve making it available because we were the only ones to ask about it. I find that hard to believe because the capability is so important. So, if others want the capability, they should speak up and submit enhancement requests to GE asking for it. .
I would love to know how to do this, even with the downsides. could you please elaborate on how this works? Thank you!
You can use the page close handler. If the user tries to sign this code will fire. If you haven't used it before you can get to it by: Click on the title bar of your form -> Click ok. This will bring up the page dialog box. Check the 'use page close handler' and put you code there.
Here is a very simple example to get you started. If you don't enter a value for the "weight" obs term it will stop and prompt you on document sign:
Start a new form with an edit box with the "weight" obs term attached. Put the following in the worksheet:
fn fnCheckWeight()
{
if (OBSNOW("weight") == "") then
return "fail"
else
return "pass"
endif
}
Put the following in the page close handler:
{
check = fnCheckWeight()
if (check == "pass") then
CLOSEPAGE("TRUE")
else if useryesno("Weight value not entered. Yes to continue. No to return to form.") == "Yes" then
CLOSEPAGE("TRUE")
else
CLOSEPAGE("FALSE")
endif
endif
}
By the way, are there instructions on the forum I've missed that note how to attach vfe files?
Brad
Just shooting this out there to see if it sticks, but can you have the function that you want to execute also write to an observation term. If the document is SIGNED and the observation term value is committed to the flowsheet, then the function is triggered. So lets say if last_signed_obs_date is equal to the date of the update, then the function fires.
Just put my enhancement request in for an ability to check things just before a document is signed. We've wanted this for a while too.
They told us the same thing, that we were the only ones to ask for it and I had the same reaction. Either they are not being truthful or they don't share information about customer requests. We also have submitted an enhancement request for the same feature. Don't hold your breath.