Testing interest: | XM Community

Testing interest:

  • 17 March 2018
  • 0 replies
  • 11 views

Userlevel 4
Badge +3
A lot of my projects involve Custom End of Survey Messages, but will be doing custom emails, and Piped Text Input in styled/HTML Survey Blocks. One of my biggest bottlenecks is the Qualtrics IDE (It is excellent, but I enjoy working on my own, local IDE, Visual Studio Code).

Another bottleneck I face is Piped Text Token (i.e. `${e://Field//Total}`). When I run code in my local IDE, and have a Chart.js that takes in an array of embedded fields, in have to swap them in and out to test it locally and then post the code in Qualtrics.

I, today, started developing a Transpiler of sorts, as an NPM Package. Copies your code with Piped Text Tokens, and replaces them with sample data. I wanted to get a feel for if you guys would like a copy, or if there is interest so I could package it up and serve it publicly.

It takes in three key pieces of data: a Source Directory, an Output Directory, and a list of key-value pairs, the key being the Piped Text Token, and the value being the Sample data.

This way, you can run and sample the output of your Custom, Piped HTML document, and upload it without having to replace with sample data. After deciding this is what you want to run with, you simply copy your `src` directory items into your Survey/Message!

I call it `rpqt` (Red Pepper Qualtrics Transpiler). It's not live yet, but should be soon.

Here is a sample `.rpqt-config.json` :

```
{
"input-dir": "./src",
"output-dir": "./dist",
"values": [
["${q://QID1/QuestionText}", "What is your favorite color?"],
["${q://QID1/ChoiceDescription/1}", "Blue!"],
]
}
```

What this tells the transpiler is that the field `${q://QID1/QuestionText}` should evaluate to `What is your favorite color?`.

When given this file:

```
<!-- ./src/index.js -->
<ul>
<li>ALL THE PIPES:</li>
<li>${q://QID1/QuestionText}</li>
<li>${q://QID1/ChoiceDescription/1}</li>
</ul>
```

It will transpile it to this output
```
<!-- ./dist/index.js -->
<ul>
<li>ALL THE PIPES:</li>
<li>What is your favorite color?</li>
<li>Blue!</li>
</ul>

```

I have it handling errors, and if you don't have a value, you can just pass in an array with just the key, and it will replace the output with a blank value: (i.e.: ` ["${q://QID1/ChoiceGroup/SelectedChoices}"]`

I'll bundle it up for internal use, but would like to get feedback on whether that's something you might like!

It's not on Github yet, but when it is, I'll shoot you a link!

0 replies

Be the first to reply!

Leave a Reply