I insert piped text ${q://QID18/ChoiceTextEntryValue} into different other questions, use it in display logic, branching conditions as well as within email trigger.
Now I need to insert text obtained from string ${q://QID18/ChoiceTextEntryValue} by removing the first two characters. For example, ${q://QID18/ChoiceTextEntryValue} is 'CP104A', then I need to be able to insert text '104A' into questions. Can it be achieved with RegEx expression?
The original string ${q://QID18/ChoiceTextEntryValue} should not be changed.
I am new to Qualtrics and not yet familiar with JavaScript.
Thanks!
Page 1 / 1
I think there is no way to directly manipulate piped text so you can try below workaround.
Put `<span class="trimT"></span>` where you want to pipe the text and then in javascript write below code:-
var pText = "${q://QID18/ChoiceTextEntryValue}"
jQuery('.trimT').html(pText.slice(2,pText.length));
Put `<span class="trimT"></span>` where you want to pipe the text and then in javascript write below code:-
var pText = "${q://QID18/ChoiceTextEntryValue}"
jQuery('.trimT').html(pText.slice(2,pText.length));
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.