Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API
Created by Guest
Created on Jul 18, 2017

Allow Custom Expressions to be written using IronPython

The current custom expression language is adequate for simple expressions, but having a full fledged python interpreter would greatly increase the readability and utility of these expressions/functions.  Further, since the current custom expression language is proprietary, moving to an industry standard would make learning spotfire easier and allow developers to become proficient faster.

  • Attach files
  • Guest
    Reply
    |
    Oct 31, 2017

    What you are describing is building an expression within python.  I was suggesting having python be available as a language to write expressions in.  I.e. add a calculated column and writing the logic for it using python.  What you are describing is just updating an expression using python - the underlying expression language is still the proprietary limited language.

  • Guest
    Reply
    |
    Oct 31, 2017

    I believe this is currently available. I have attached a section of Iron Python code that I use today that builds the custom expression in a cross table dynamically based on the user selection in a slider. So, as the user moves the slider the expression updates. 

    In the example, the expression is very easy. Just a simple "NEST". You can update this accordingly. 

    Also, this example just refers to the Horizontal axis. If you wanted to change the vertical axis you would need replace "ColumnAxis" with "RowAxis". To change the values inside the cells you would need to replace "ColumnAxis" with "MeasureAxis". I have placed both of these examples in the code as a comment. They are the last two lines of the code.