Hi,
I have a survey with a ‘lab.js’ screen included in it. The results from that screen are extracted and stored in a Qualtrics Embedded data field. When I view the results within Qualtrics I can see that all the ‘lab.js’ data is there but concatenated into a single cell. When it is downloaded some of this data has been truncated. I have tried to reformat this data within Qualtrics using Piped data and Javascript. I think that because it includes numerous quotation marks the Javascript is getting confused and my Javascript variables do not get populated when I try to copy the embedded data into them. I have tested that I am able to display the whole concatenation within an HTML tag on a later question screen, so I know the Piped data is accessing the right field. I am only interested in a few items at the end of the concatenated embedded data that are missing from the truncated downloaded field.
Is it possible to increase the size of the downloaded embedded data?
If not, is it possible to copy and reformat into smaller embedded data fields via Javascript some selected parts of the data from the original concatenation that could then be downloaded in a more user-friendly format?
Please see this discussion: https://www.qualtrics.com/community/discussion/comment/35885
https://www.qualtrics.com/community/discussion/comment/35885#Comment_35885
And raise an issue with Qualtrics sp that they do something about it.
For the benefit of others who might find this question since it was originally posted:
Single and Double Quotation marks can cause issues in many systems and languages because they are usually reserved for system use. If you want to use them, you have to add an escape character.
If you ever run into something like this, try each of the following. If a step doesn’t work, be sure to remove it and move to the next.
In Javascript:
By placing a backslash (`\`) before a quote, you can ensure that the quote is treated as part of the string rather than as a delimiter.
In HTML, the escape character for a quote (double quotation mark) is """.
Explanation:
- """: Represents a double quote character.
- "'": Represents a single quote or apostrophe character.
In most database systems, the escape character for quotes is a backslash (\), meaning you would put a backslash before a quote to indicate that the quote should be interpreted literally within a string.
Key points about escaping quotes in databases:
- Common syntax: To escape a single quote, use
'
, and to escape a double quote, use\"
. - Example: To store the string "O'Neill" in a database, you would write it as
'O''Neill'
.
For the benefit of others who might find this question since it was originally posted:
Single and Double Quotation marks can cause issues in many systems and languages because they are usually reserved for system use. If you want to use them, you have to add an escape character.
If you ever run into something like this, try each of the following. If a step doesn’t work, be sure to remove it and move to the next.
In Javascript:
By placing a backslash (`\`) before a quote, you can ensure that the quote is treated as part of the string rather than as a delimiter.
In HTML, the escape character for a quote (double quotation mark) is """.
Explanation:
- """: Represents a double quote character.
- "'": Represents a single quote or apostrophe character.
In most database systems, the escape character for quotes is a backslash (\), meaning you would put a backslash before a quote to indicate that the quote should be interpreted literally within a string.
Key points about escaping quotes in databases:
- Common syntax: To escape a single quote, use
'
, and to escape a double quote, use\"
. - Example: To store the string "O'Neill" in a database, you would write it as
'O''Neill'
.
Hi
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.