Keng
Keng

Reputation: 53111

How can I use a column's externalname as its refernce in a custom expression in Spotfire?

because the column name will be dynamic in our analytic, we cannot do the standard custom expression syntax

[Amount]*2

we need to use something like this externalname which won't change (without notice anyway) like this.

{databaseTableName}.{Amount}.{ExternalName}*2

Doesn't have to be externalname but does have to bypass the dynamic column name.

Upvotes: 0

Views: 314

Answers (2)

A workaround can be to duplicate the column:

  • keep it with its external name and refer to it in expressions
  • create a calculated column just mirroring the original (=[external name]) and change its name with the script.

Upvotes: 0

niko
niko

Reputation: 3974

Keng, this sounds like an X Y Problem.

it does not make sense to change the actual name of a column so frequently. what is your end goal? what added functionality are you providing by allowing this modification?

if you are trying to change the displayed name for a column, that is very easy to do with the AS keyword. [MyColumn] AS [Some Column Name] or [Col_A] + [Col_B] AS [Sum of A and B] or even [Column] AS ${DocumentProperty} will all provide a column with the given DISPLAY name without having to modify the underlying column at all.

Upvotes: 0

Related Questions