Piping Partial Text: Can this be done? | XM Community
Solved

Piping Partial Text: Can this be done?


Userlevel 3
Badge +11
I have a question in which I only want to pipe in part of text from a previous answer. Here is my scenario:

Q: Please select a semester:

Fall (August to December)
Spring (January to May)
Summer (May to August)

I then want to use piped text in an email action to just say either Fall, Spring, or Summer and not have that extra info from the question. I would just use an embedded data through an API, but asking this question is a unique circumstance.

It seems like this could be done somehow with so kind of reverse embedded data setup, but I want to ask and take into account all considerations before I start experimenting
icon

Best answer by rondev 17 May 2019, 21:44

View original

12 replies

Userlevel 7
Badge +22
@over3520 - You can use branch logic after this question and based on selected choice assign a value to new embedded data and use this new embedded data in email.
Userlevel 3
Badge +11
@rondev Thanks!
Badge +1
Even easier is to recode your responses to what you want and then use the recoded value.

Click on the gear to the left of your multiple choice question and select "Recode values..."
Choose the Variable Naming box and enter the text you want to use in later.

Then you can pipe the recoded value into your later questions, emails, etc.
Userlevel 3
Badge +11
@WaterSampler how do I get the variable name to show up? I can get the recode value (1,2,3) to pipe in but I cannot get Fall, Spring, Summer to pipe in? Thanks.
Badge +1
@over3520
1. did you check the 'Variable Naming' box and enter the text without the month range?
2. after step 1, when you pipe text there is now a choice 'Selected Choices Recode'
The Recode option does not show up unless you do step 1.
> @WaterSampler said:
> Even easier is to recode your responses to what you want and then use the recoded value.
>
> Click on the gear to the left of your multiple choice question and select "Recode values..."
> Choose the Variable Naming box and enter the text you want to use in later.
>
> Then you can pipe the recoded value into your later questions, emails, etc.

Qualtrics gives us the option to pipe in the recode value but not the recode variable name, and in recode value we cannot enter words.
Badge +1
@Sashi
True that the recode <i>value</i> is numeric, but if you choose <i>Variable Naming</i> you can type in what you want the variable names to be reported as.

Example: I have a question asking for cardinal compass directions: North, Northeast, East, Southeast, etc. In my emailed report back to the user we want the directions abbreviated: N, NE, E, SE, etc. The variables are renamed and reported using piped values with Selected Choices Recode.

If you cannot see this, maybe it is an optional feature. If it is optional, it is good to know that.
> @WaterSampler said:
> @Sashi
> True that the recode <i>value</i> is numeric, but if you choose <i>Variable Naming</i> you can type in what you want the variable names to be reported as.
>
> Example: I have a question asking for cardinal compass directions: North, Northeast, East, Southeast, etc. In my emailed report back to the user we want the directions abbreviated: N, NE, E, SE, etc. The variables are renamed and reported using piped values with Selected Choices Recode.
>
> If you cannot see this, maybe it is an optional feature. If it is optional, it is good to know that.
>

Can we pipe in the selected variable name ?
Badge +1
Yes, you can use the original name (Selected Choices), the numeric value or the recoded value in the pipe.
Badge +1
@Shashi
You were correct. I had put some javascript to code the value into an embedded variable for email.
Sorry for the confusion.
> @WaterSampler said:
> @Shashi
> You were correct. I had put some javascript to code the value into an embedded variable for email.
> Sorry for the confusion.

Ahh its fine !
Userlevel 5
Badge +11

Hi WaterSampler,
Would you be happy to hare the JavaScript that does this? I've been looking for some code to give me some guidance in something similar that I'm trying to do, which is to tidy up by a string by removing certain characters using regex and then updating the embedded field..

Your help would be much appreciated.

Thanks

Rod Pestell

Leave a Reply