Branching Logic with Lookup Tables - built-in solutions are insufficient | XM Community
Skip to main content
Solved

Branching Logic with Lookup Tables - built-in solutions are insufficient

  • August 7, 2024
  • 1 reply
  • 54 views

Forum|alt.badge.img+1

I'm developing a system to construct numerous, complex surveys multiple times a year. These surveys necessitate extensive branching logic contingent on data sourced from lookup tables. My primary goal is to fully automate this process, eliminating manual data input into Qualtrics beyond the integration of JavaScript code.

A quintessential example involves determining eligible election candidates based on respondent location. By ascertaining the respondent's city and electoral district, I intend to dynamically populate questions with the appropriate candidate list using data retrieved from a lookup table.

I’ve investigated Qualtrics’ built-in lookup tasks and Google Sheets integration but found them inadequate for my needs. Lookup tasks demand manual input of corresponding values, while Google Sheets restricts lookups to a single column. I’ve also experimented with embedding data as a string within JavaScript and processing it manually using D3, but compatibility issues with Qualtrics' environment have hindered progress. I suppose I could resort to implementing my own data processing algorithms to avoid this problem.

I’m seeking guidance on either an overlooked Qualtrics feature that can achieve this or recommendations for developing custom JavaScript functions without relying on external libraries like D3.

Best answer by resh_kr

If your data set is large, you could upload a CSV or JSON file containing the lookup table, and use JavaScript's fetch or XMLHttpRequest to load it into your survey when needed OR use external APIs or Databases. OR using Supplemental Data Source.

View original

1 reply

Forum|alt.badge.img+6
  • QPN Level 2 ●●
  • 40 replies
  • Answer
  • January 5, 2025

If your data set is large, you could upload a CSV or JSON file containing the lookup table, and use JavaScript's fetch or XMLHttpRequest to load it into your survey when needed OR use external APIs or Databases. OR using Supplemental Data Source.


Leave a Reply