I'm not sure if what I'm thinking is possible but I'd love to hear some ideas if anyone has any.
Right now I have a form with a bunch of action buttons for different kinds of DME products. When the button is pushed it adds a line of text into an multi line edit field that is currently just a document variable. And if you push more than one button it just does a hard return after each item and then lists the next one. What I'd like to do is make several single line edit fields that are each linked to an obs term (DME_GEN1, DME_GEN2, etc...) When the first button is pushed it will generate the obs term with the value of that product. Once the second button is pushed it will see that DME_GEN1 has a value already and move to DME_GEN2, so on and so forth. Is this possible? Thanks!
Sure. You can do something like this in your button:
{
if document.vartosave < > "" then
COND
CASE OBSNOW("term1") == ""
OBSNOW('term1", document.vartosave)
CASE OBSNOW("term2") == ""
OBSNOW('term2", document.vartosave)
CASE OBSNOW("term3") == ""
OBSNOW('term3", document.vartosave)
else
//put some code here to do something when all obsterms have a value
ENDCOND
else
userok("please enter a value") //no value was entered in the document variable
endif
]