Is it possible to pipe the values of multiple variables next to each other? For example, if I am creating a Descriptive Text Field in REDCap, and I want the field label to display the values of two variables right next to each other (no spaces) (i.e., Link to Database: [variable1][variable2]). It seems that when I try to do so, only the first variable is piped in. Is there a workaround for that?
Also, is it possible to pipe in special functions and smart variables into the logic editor? In the logic editor, I tried to put in the following syntax:
@DEFAULT=concat('[redcap-version-url]','[qi106:value]'), @READONLY
However, this only resulted in a blank field, even though there is a value for qi106 and even though [redcap-version-url] always outputs the same value (the first part of a URL that also indicates the current REDCap version). Does this combination of action tags and special functions not work together?
To concatenate these fields and display them in a descriptive text field, you should create a text entry field to generate the text with @CALCTEXT. As you noted, piping two values out into a descriptive text field does not work, as REDCap expects this syntax to be [event_unique_name][variable]
, so the piping fails.
So, create a text field, called whatever you want, and annotate it with this:
@CALCTEXT(concat([redcap-version-url],[qi106:value]))
And then you may pipe it into a descriptive text field.
Your attempt with @DEFAULT is also a good attempt, but its purpose is only to set an initial (default) value that can be overridden by the user (although you have prevented that with @READONLY), but I don't think @DEFAULT accepts the concat()
function.