Hello QuickSight Community ,
Long time reader, first time poster
The dataset used to generate one of our dashboards includes a field for User Agents. We also use this field to filter the dashboard visuals. In the dashboard, we display the User Agents in a table where a user can click on the User Agent to apply the filter (using a Navigation action to update a parameter which in turn updates the User Agent filter).
However, when we click on one of the User Agents that has got an escape character (Screenshot above), we get the following error message displayed on all visuals.
Your calculated field expression contains invalid syntax. Correct the syntax and try again
Example of how the User Agent is formatted:
Mozilla/5.0 (Windows NT 10.1; x64; en-US) AppleWebKit/603.42 (KHTML, like Gecko) Chrome/52.0.1816.333 Safari/601.5รยงรยข%2527%2522\'\"
(Take note of the last 4 characters)
We tried following a solution suggested in the community for someone who had a similar issue https://community.amazonquicksight.com/t/how-to-escape-backslashes/632 where you escape the escape character itself which partially worked. We managed to escape the first escape character by adding two escape characters \
(Mozilla/5.0 (Windows NT 10.1; x64; en-US) AppleWebKit/603.42 (KHTML, like Gecko) Chrome/52.0.1816.333 Safari/601.5รยงรยข%2527%2522\\\
)
but when we tried to add the single quote after, we got the same error message as above. Escaping the single quote did not help
Is there a way to parse the whole User Agent string without generating the error message?