Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Created by Guest
Created on Feb 6, 2016

Expression Function in calculated column or in custom expression should work without any parameter value

Expression Function in calculated column or in custom expression always requires at least single parameter value to be passed.

Steps to reproduce:

- From Spotfire 7.0 Beta release , define new expression function
(via the 'Data Function properties' in the 'Edit' menu, and then in the "Expression Functions" tab "New...")

- Create ‘expression function’ with name ‘ListPackages’ using below expression.
output
- Go to Insert->Calculated Column…
- Use expression ‘ListPackages()’
- It will not validated and give warning message on Red icon ‘Invalid type for function call ‘ListPackages’’
- However, it will work if we pass at least one numeric value as parameter to ListPackages. Examples : ListPackages(1) , ListPackages(1,5,15)
- Attached are screen shots.
- Issue is also reproducible in Spotfire 6.5.2

  • Attach files
  • Guest
    Reply
    |
    Jun 20, 2023

    Just ran into this today. I was trying to build a function to return a constant, Planck's constant to be precise, and you have to pass it at least one input. I want it to be like the pi() function; no input needed, just return the value. And the thing is, you can create these kinds of functions in R studio just fine. Why can't we do the same here?

  • Guest
    Reply
    |
    Apr 16, 2016

    I am not convinced this is feasible, because of the nature of Expression Functions. However, I'd like to better understand the use cases where this would be helpful.