Changing to Numeric data type before sending JSON to salesforce | XM Community
Skip to main content

Changing to Numeric data type before sending JSON to salesforce

  • February 15, 2023
  • 2 replies
  • 40 views

Forum|alt.badge.img+1

Hey all,
Have a question regarding datatypes in qualtrics. I have a field in qualtrics that has validation set to content type and number with a minimum value above zero and a maximum value below 10000000.
This data field eventually has a workflow that sends it to salesforce, but salesforce rejects any value that has a comma in it (e.g., 100,000). Is there a way to maintain the data validation in qualtrics, drop the comma, and just send the numeric value in the JSON?

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 15, 2023

You could add this JS to the question:
Qualtrics.SurveyEngine.addOnPageSubmit() {
var input = jQuery("#"+this.questionId+" .InputText");
input.val(input.val().replace(/,/g,"");
});


Forum|alt.badge.img+1
  • Author
  • February 15, 2023