Hi there,
I'm trying to add an action button to add text from 'document variable' to text field linked to an OBSTERM.
Can someone help me out?
Thanks
You can choose 'runprocess' in the button connection type. Then in the box you want to do something like this:
{
OBSNOW("OBSTERM",DOCUMENT.VARIABLE)
}
The "OBSTERM" above is the term you want the value to go into. Also change 'VARIABLE' in DOCUMENT.VARIABLE to whatever variable you are using. This will send over the entire string in the variable. I'm assuming that's what you want and not a substring. If it's not let me know.
Brad
You're awesome! Thanks!
It looks like when I click that it's erasing the other text to that text box. Is there another way that I can add that text without it erasing everything else that is in there?
Thanks,
AC
It looks like when I click that it's erasing the other text to that text box. Is there another way that I can add that text without it erasing everything else that is in there?
Thanks,
AC
there are a couple ways to do this. Instead of using "runprocess", I use "set value" and in the options set it to "append".
If you want this button to pull in just one constant value, then you can select the obsterm used for the text box and add the text there. If this is going to pull variable values based on answers given then I would build a function in the panel on the right and then put the function in the obsterm used for the text box in the "set value" list.
If you would like further explanation, let me know and I can go into further detail.
So are you trying to append?
Document variable = "10/20 was a good day."
OBS term = "10/15 was a bad day." [already exists from previous work]
and you therefore want the button push to create
OBS term = "10/15 was a bad day. 10/20 was a good day."
{if obsnow("OBSTERM") == "" then obsnow("OBSTERM",DOCUMENT.VARIABLE")
ELSE obsnow("OBSTERM",Obsnow("OBSTERM") + " " + DOCUMENT.VARIABLE)
ENDIF}
that should get you what you need.
if the obsterm has no current value, it will simply record document.variable. If the obsterm has a value, it will add the obsterm value, plus a space, plus your document variable value.
Hope this helps!