How Property Controls are handled with regard to data type and formatting?
book
Article ID: KB0083382
calendar_today
Updated On:
Description
Information about "Insert as Value" vs "Insert as Text", and how data types are passed.
Issue/Introduction
How Property Controls are handled with regard to data type and formatting?
Environment
Product: TIBCO Spotfire (Desktop client / Analyst / Professional)
Version: All supported versions
OS: All supported Operating Systems
Resolution
Let's say we have two string properties:
MyReal: "10"
MySum: "sum"
When using "Insert as Text"* the value of the property is added into the expression as is, without quotes, even when the property is string.
The value of the property can be expression itself:
2*${MyReal} evaluates to 2*10 (without quotes! it is not a string anymore)
${MySum}([Column1]) evaluates to sum([Column1]) (a valid expression)
When using "Insert as Value", if the value of the property is string it is added as string literal, i.e. the quotes are added.
2*DocumentProperty("MyReal") evaluates to 2*"10" (with quotes, the expression is not valid),however
2*Real(DocumentProperty("MyReal")) evaluates to 2*Real("10") - valid expression.
DocumentProperty("MySum")([Column1]) evaluates to:
"sum"([Column1]) (the expression is not valid).
*Clicking on the "Insert Properties" button produces the same result as "Insert as Text".
Feedback
thumb_up
Yes
thumb_down
No