Product: TIBCO Spotfire®
How Property Controls are handled with regard to data type and formatting?
Information about "Insert as Value" vs "Insert as Text", and how data types are passed.
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".
Comments
0 comments
Article is closed for comments.