Piping Partial Text: Can this be done? | XM Community
Skip to main content
Solved

Piping Partial Text: Can this be done?

  • May 17, 2019
  • 12 replies
  • 629 views

Martin_O
Level 2 ●●
Forum|alt.badge.img+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

Best answer by rondev

@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.

12 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1450 replies
  • Answer
  • May 17, 2019
@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.

Martin_O
Level 2 ●●
Forum|alt.badge.img+11
  • Author
  • Level 2 ●●
  • 65 replies
  • May 17, 2019
@rondev Thanks!

WaterSampler
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 105 replies
  • May 18, 2019
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.

Martin_O
Level 2 ●●
Forum|alt.badge.img+11
  • Author
  • Level 2 ●●
  • 65 replies
  • May 18, 2019
@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.

WaterSampler
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 105 replies
  • May 18, 2019
@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.

  • 0 replies
  • May 18, 2019
> @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.

WaterSampler
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 105 replies
  • May 18, 2019
@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.

  • 0 replies
  • May 18, 2019
> @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 ?

WaterSampler
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 105 replies
  • May 18, 2019
Yes, you can use the original name (Selected Choices), the numeric value or the recoded value in the pipe.

WaterSampler
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 105 replies
  • May 18, 2019
@Shashi You were correct. I had put some javascript to code the value into an embedded variable for email. Sorry for the confusion.

  • 0 replies
  • May 18, 2019
> @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 !

Forum|alt.badge.img+11
  • Level 4 ●●●●
  • 367 replies
  • July 15, 2020

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