The getDistinctValues Method in the Javascript API returns the Unicode representation "\u0026" for character '&' (i.e: "AMPERSAND").

The getDistinctValues Method in the Javascript API returns the Unicode representation "\u0026" for character '&' (i.e: "AMPERSAND").

book

Article ID: KB0078330

calendar_today

Updated On:

Products Versions
Spotfire Web Player 7.5 to 7.13

Description

1) The getDistinctValues Method is used to get a list of the unique values present in the data column.

2) Consider one of the values in the Data Column is 'Dues & Subscriptions'.

3) When getDistinctValues method is executed in order to fetch the list of the unique values in the column then the method should ideally return 'Dues & Subscriptions' as one of the distinct values but the method returns 'Dues \u0026 Subscriptions'. 

4) Please refer the below image:

User-added image


Note: a) \u0026 is the unicode representation of AMPERSAND. 
          b) The above behavior occurs, while implementing Javascript API version 7.5 and 7.12

Environment

All Supported Environments.

Resolution

The above behavior has been fixed in the latest Javascript API version - 7.14. 

Please refer the below image:

User-added image

Note:  The JavaScript API version 7.14  is used for Spotfire Server version 7.14 and 10.0. 

Issue/Introduction

getDistinctValues method when executed in order to fetch the list of the unique values in the data column returns the unicode representation of '&' .

Additional Information

https://community.tibco.com/wiki/tibco-spotfire-javascript-api-overview
https://stackoverflow.com/questions/12702249/json-converts-in-a-string-to-u0026