Max2
(Maximilian Spürck)
April 26, 2022, 12:10pm
1
What product/components do you use and which version/fix level?
Cumulocity 1011.0.12
Are you using a free trial or a product with a customer license?
License
What are trying to achieve? Please describe in detail.
I want to use the numeric template parameters as input of an expression-block. How can I use the template parameters as input?
Hi Maximilian,
The expression block requires a string when used as a template parameter. The expression must be something like “input1 * 16”.
So you can just change the numeric parameter to string. This should be selectable in the expression block afterwards and will output a fixed value or can be used to calculate something with the input parameters (see my example above for input1)
Max2
(Maximilian Spürck)
April 26, 2022, 1:42pm
3
Thanks for the quick feedback!
Unfortunately I get an error when I try it the way you described.
Do you possibly know how I can fix this one?
Hi Maximilian,
the reason for that is that input1 retrieved from the properties seems to be a string while your constant value is a float.
You can add .toFloat() to your expression if the property value is a convertible string
https://documentation.softwareag.com/onlinehelp/Rohan/Apama/v10-3-1/apama10-3-1/ApamaDoc/string.html#toFloat()
100-(((input1.toFloat()-input2)*100)/180)
Do you have example values for input1 and input2?
system
(system)
Closed
July 25, 2022, 2:10pm
7
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.