I have created a STRAT Tool form and at the end of the form I have a 'Calculate Score' button that adds up a score based on answers to the questions in the form and places that value in a score 'data' field which has an OBSTERM. I am trying to figure out if there is a way to automatically send a flag or some sort of trigger if that score is greater than a certain number. So if the score > 10 then I want a flag or trigger sent to a user.
Any help would be appreciated.
Thanks,
Josh Hoffelmeyer
Yes, but you need to do some SQL coding. If you store the data in a OBSTerm, all you have to do is build a SQL Trigger that is linked to the OBS table, and when that term is inserted, have it check the value, and if the value is greater than whatever you need it to be, then create the record in the FLAG table which is where it stores the flag, you will need to do a bit of research on the PVID's for the user(s) you want to send them to, but yes, it is possible. I do custom things like this all the time.
You could use the MEL code MEL_SEND_FLAG (Type, To, Priority, Due date, Subject, Message, Chart_tab, Expiration date) as well to send a flag to a user. You can find out about how to use it in the Centricity help file, but you would basically say:
{if value > 10 then
MEL_SEND_FLAG (Type, To, Priority, Due date, Subject, Message, Chart_tab, Expiration date)
endif}
you would probably want a variable to check that a flag was sent as well, so you do not spam a user with flags every time the document is put on hold.