I'm trying to build a simple form that requires users to document vaccine status but only if the patient is between the ages of 0-72 months. I check marked Use page close handler but the form still requires users to document status regardless of the patient's age. I'm using if patient._ageinmonths > 71 then useryesno("This patient is over the age of 6. Are you sure you want to document vaccine status")
else ""
ENDIF in the page close handler but the message doesn't popup until a user documents something in the vaccine status field. Any help would be greatly appreciated. I have very limited MEL language.
Double-check that in VFE, Tools, Options, Build tab you have "Include page close handlers checked".
I have it checked in options and the form popups an alert when in a patient's chart however I only want the form to prevent users from going to the next form if the patient is between the ages of 0-6. Right now the form won't allow users to go to the next form even if they're an adult. I only have very basic VFE training so I'm sure I'm missing a big component somewhere. I have the following in the Use page handler::
if patient._ageinmonths<72 then useryesno("This patient is over the age of 6. Are you sure you want to document vaccine status")
else ""
endif