Skip to main content
1-Visitor
December 7, 2016
Solved

Referencing data using the expression widget?

  • December 7, 2016
  • 1 reply
  • 3367 views

I am trying to use an expression to print out different points of data, but I cannot figure out how to reference the data within the expression. (e.g. curVal coming from a Thing I am using in the Mash)

To give you an idea of what I am trying to do, I have a list that, depending on what is selected I want to output different data points. My thought was to use an expression along with the selected name to output the results.

if (Cmd_name=== "Beam Block Percentage"){Output = "Test worked"} else {Output = "Not BeamBlock"}

I just can't seem to reference the data in place of "Test worked".

Best answer by jamesm1

You need to configure the expression to have an input value parameter by clicking the arrow on the top right when hovering over the widget and then selecting Configure Widget and adding in the parameter, then you can bind to that parameter and use it in the expression similar to a param in a service.

1 reply

jamesm15-Regular MemberAnswer
5-Regular Member
December 7, 2016

You need to configure the expression to have an input value parameter by clicking the arrow on the top right when hovering over the widget and then selecting Configure Widget and adding in the parameter, then you can bind to that parameter and use it in the expression similar to a param in a service.

tcain1-VisitorAuthor
1-Visitor
December 7, 2016

Thank you! I can't believe I missed that. I brought in the Cmd_name but not the other.

Thanks again!