Skip to main content
10-Marble
June 22, 2023
Solved

How to return only a certain value from infotable

  • June 22, 2023
  • 1 reply
  • 1371 views

I tried to use the code from https://community.ptc.com/t5/IoT-Tips/Analytics-Prediction-Methods-Mashup/ta-p/817989#M30973, but there is an error for the last line of predict strength script. Then I change the result to only predictivescorse, and got this result. How do I get only the expected outcome and put it into my properties?

AF_10333884_0-1687409823354.png

 

thanks

 

 

Best answer by Velkumar

Hi @A_10333884 

 

Please find the below snippet. 

var expectedOutCome = resultInfoTable.rows[0].ExpectedOutCome; // Get Outcome value from InfoTable
me.propertyExpectedOutCome = expectedOutCome // Update Properties

 

/VR

1 reply

Velkumar19-TanzaniteAnswer
19-Tanzanite
June 22, 2023

Hi @A_10333884 

 

Please find the below snippet. 

var expectedOutCome = resultInfoTable.rows[0].ExpectedOutCome; // Get Outcome value from InfoTable
me.propertyExpectedOutCome = expectedOutCome // Update Properties

 

/VR

10-Marble
June 23, 2023

Hi,

 

I tried to do what you just said, but the result become undefined when it should be string/number

AF_10333884_0-1687481227558.png

 

19-Tanzanite
June 23, 2023

Hi @A_10333884 

 

There is a typo in your script line number 32. It should be "ExpectedOutcome"

 

/VR