cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Referencing data using the expression widget?

tcain
1-Newbie

Referencing data using the expression widget?

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".

1 ACCEPTED SOLUTION

Accepted Solutions
jamesm1
5-Regular Member
(To:tcain)

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.

View solution in original post

2 REPLIES 2
jamesm1
5-Regular Member
(To:tcain)

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.

tcain
1-Newbie
(To:jamesm1)

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

Thanks again!

Top Tags