Product:TIBCO Spotfire Analyst
Versions:All
Summary:
Column selection for visualizations in TIBCO Spotfire using property controls may fail for some columns, with errors like "The expression is not valid after 'xxx' on line 1 character 1". This article describes how to handle the case where the column name contains blank space.
Details:
Consider the below data set.
Name Age Sex Order ID
Note: the "Order ID" column name contains a blank space.
Create a Drop-down Property control named "test" in text area to dynamically choose the column for X axis of the Bar Chart visualization. In the X-axis of Bar Chart Visualization using the expression "${test}" rightly populates the column selected in the Property Control for all columns except for "Order ID".
When Property control selected is "Order ID" the Bar Chart Visualizations throws an error " The expression is not valid after 'Order' on line 1 character 1. The reason for this is because of the space between 'Order' and 'ID' in the 'Order ID' column.
Resolution:
To ensure that the expression handles the blank space properly, alter the custom expression for the X-axis of the Bar Chart Visualization to <$esc(${test})>. This syntax is used automatically when using the "Set From Property" functionality on an axis selector. For an example, please refer to the attached analysis file.
More information on this general topic, further explaining the use of the $esc function, can be found in the page Troubleshooting Property Expressions, in the TIBCO Spotfire Analyst User's Guide: https://docs.tibco.com/pub/sfire-analyst/11.4.3/doc/html/en-US/TIB_sfire-analyst_UsersGuide/index.htm#t=prop%2Fprop_troubleshooting_property_expressions.htm
Versions:All
Summary:
Column selection for visualizations in TIBCO Spotfire using property controls may fail for some columns, with errors like "The expression is not valid after 'xxx' on line 1 character 1". This article describes how to handle the case where the column name contains blank space.
Details:
Consider the below data set.
Name Age Sex Order ID
John | 23 | m | 1234 |
Tanya | 19 | f | 7863 |
Cena | 42 | m | 7856 |
Jill | 40 | f | 8907 |
Create a Drop-down Property control named "test" in text area to dynamically choose the column for X axis of the Bar Chart visualization. In the X-axis of Bar Chart Visualization using the expression "${test}" rightly populates the column selected in the Property Control for all columns except for "Order ID".
When Property control selected is "Order ID" the Bar Chart Visualizations throws an error " The expression is not valid after 'Order' on line 1 character 1. The reason for this is because of the space between 'Order' and 'ID' in the 'Order ID' column.
Resolution:
To ensure that the expression handles the blank space properly, alter the custom expression for the X-axis of the Bar Chart Visualization to <$esc(${test})>. This syntax is used automatically when using the "Set From Property" functionality on an axis selector. For an example, please refer to the attached analysis file.
More information on this general topic, further explaining the use of the $esc function, can be found in the page Troubleshooting Property Expressions, in the TIBCO Spotfire Analyst User's Guide: https://docs.tibco.com/pub/sfire-analyst/11.4.3/doc/html/en-US/TIB_sfire-analyst_UsersGuide/index.htm#t=prop%2Fprop_troubleshooting_property_expressions.htm