Hello,
I am trying to get a button to show up when something needs to be committed, and then go away once it has been pressed and just show the word committed. I know I have to use visibilities and I have 2 one blank one and the second one with the commit button. I am not really sure how to make the button disappear once the button has been pressed. Any help would be greatly appriciated.
Thanks!
-Alex
in the visibility field for the button -
'item to commit' <> "" and 'item committed' == ""
The blank visibility you dont need unless you add text to it, if you are adding text then use
'item committed' <> ""
it depends on what you are trying to commit and if you are trying to commit it to the document date or a previous date on the exact code.
I'm trying to commit a value and date to the flowsheet so my button Runprocess reads:
OBSNOW("MAMMOGRAM",DOCUMENT.MAMMOGRAM_RESULT,DOCUMENT.MAMMOGRAM_DATE)
So would I add the above in the same button or on the new visibility?
'item to commit' should be either DOCUMENT.MAMMOGRAM_RESULT or DOCUMENT.MAMMOGRAM_DATE, if the date field is blank when they commit it will add the obs to the current date.
For the 'item commited' since you are using a previous date obsnow() wont work, you could write a function to loop list_obs for an unsigned MAMMOGRAM, or the easy way would be to set a document variable, declare it in the code panel {!document.mammogram_added} add it in the action button {document.mammogram_added == "Done"} and use the document variable for 'item commited' in the visibility.
So the action button, runprocess with the following code -
{OBSNOW("MAMMOGRAM",DOCUMENT.MAMMOGRAM_RESULT,DOCUMENT.MAMMOGRAM_DATE)}
{document.mammogram_added == "Done"}