Product: TIBCO Spotfire®
Error "Argument could not be type checked" when using a String List data type property as a data function input parameter.
When using 'List Box (multiple select)' property controls, the property data type is automatically set to a 'String List'. If the input handler for the string list input parameter is set to 'document property', 'data table property' or 'column property' (depending on your property type) then you will receive the following error when executing the data function:
Could not execute function call. Could not calculate inputs. Argument 'myStringListPropertyInput' could not be type checked.
Cause:
String list property data types are not supported for data function input parameters. When defining the data function input parameters for your input parameter that will use the property of data type string list, follow these steps in the 'Edit Parameters' Input tab:
- Select your input parameter that will use the property of data type string list.
- Choose the 'Expression' input handler instead of the 'Document property', 'Data table property', or 'Column property' options.
- Click the 'Edit' button.
- Enter an expression such as (with quotes, and updated for your property name):
- "${myStringListProperty}"
or - $map("'${myStringListProperty}'", ",")
- "${myStringListProperty}"
This will cause it to return a string of the values from the List Box property control separated by commas.
For example, your selection in the List Box are 3 values: A,B and C. Using the Expression "${myStringListProperty}", this passes “A,B,C” to the statistical engine. Using the Expression $map("'${myStringListProperty}'", ","), this passes “'A','B','C'” to the statistical engine. Within your data function you can then parse or handle this data as desired. For example, you can split these values into separate values using unlist() with strsplit() or many other methods.
Example:
> unlist(strsplit("A,B,C","\\,")) [1] "A" "B" "C"Doc: How to Use Data Functions
Comments
0 comments
Article is closed for comments.