Hello,
I would like to delete the comma separator in the piped text. Currently my piped text looks like this:
FT, 0, k, j, 02
I would like it to look like this:
FT0kj02
the answers are being piped from a Form field question -> all choices - entered texts. I'm creating a static id for participants from static prompts, which included questions like "Enter the first letters of your first car’s make and model (for example, “FT” for ford Tempo)"
Here's what the piped text code and all looks like:
your unique ID is: ${q://QID78/ChoiceGroup/AllChoicesTextEntry} You do not need to remember this, but you can write it down if you wish.
I got sort of close to the Javascript solution before I realized that it wasn't needed. You can accomplish what you are describing by adding an Embedded Data field to the Survey Flow. When going to pipe in the value for the field, select each Form field and include no other characters, like in the below:
Alternatively, if you want to guarantee that the ID value will be unique, you can show them their Qualtrics ResponseID: ${e://Field/ResponseID}
If it helps anyone later, here is the regex that will remove the comma plus 1 space from a text entry question, adapted from TomG's solution in the below thread
https://community.qualtrics.com/XMcommunity/discussion/12016/how-can-i-strip-the-first-7-8-characters-of-a-text-entry-off-of-the-response
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var input = jQuery("#"+this.questionId+" .InputText");
input.val(input.val().replace(/, /g,''));
});
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.