Qualtrics JavaScript Language Reference | XM Community
Skip to main content

Qualtrics JavaScript Language Reference

  • November 9, 2021
  • 3 replies
  • 170 views

I'm a JavaScript developer and new to Qualtrics. I see that large parts of JavaScript has been disabled by Qualtrics. Is there a language reference etc. that documents the parts of JavaScript that can be used. For instance which string operations are supported? Thanks in advance!!

3 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • November 9, 2021

If you stay clear of template literals, promises, async-await, and document.write, you should mostly be fine.
For complex stuff, I either use a backend like lambda or transpile typescript to Node 10.

There isn't a reference.


JeremyK
Level 3 ●●●
Forum|alt.badge.img+7
  • Level 3 ●●●
  • November 10, 2021

They don't even have what question types their question APIs are limited to.... I have not seen any documentation of disabled JS, it's largely been trial and error for me; I agree with ahmedA's response.


Forum|alt.badge.img
  • November 9, 2024

Is there any update to this? I was considering using promises and/or async-await in my project.

“They don't even have what question types their question APIs are limited to” 
Also, I had to learn this one the hard way when trying to obtain values within Side-by-side question types. I sort of just assumed values would be accessible because the documentation reported functions like “getChoiceAnswerValue ( choiceId answerId subId )” had a subid that I assumed delt with deeper nested question types. It wasn’t until I tried to reverse engineer the calls in debugger that I figured out that they are all just calls to getChoiceValue, and getChoiceValue didn’t seem to even see deeper nested structures like in SBS items.