Skip to main content
7-Bedrock
Oct 2, 2023 6:24 AM UTC
Solved

Add properties of a thing to infotable useing string

Hello, i'am trying to add the value of a property to the Value column of a infotable located in the same thing as the properties i want to use. I have the name of every property in string format and since there are around 200 of them i wanted to use this to add them. example:

myArr = [{Name: 'Tag1', Message: 'Hello', Type: 'BOOLEAN'},

{Name: 'Tag2', Message: 'Sweet', Type: 'BOOLEAN'}]

 

me.myInfo.AddRow( 

     {

       Name: myArr[0].Name

       Message: myArr[0].Message

       Status: me.myArr[0].Name //This part dont work. I Have a property with that exact name and i want the status for that property

     }

 

how can i reffrence the tag with the string i have? Or another smarter way to refrence it? In my program im planning to use a for loop to go over every tag one at the time.Thingworx.png

 

 

 

7-Bedrock
Oct 2, 2023 6:30 AM UTC

GH_10737740_0-1696228181741.png

Ended up finding this justt after i posted and it seems to work fine... Thanks anyhow

1 reply

GustavHerrst7-BedrockAuthorAnswer
7-Bedrock
Oct 2, 2023 6:30 AM UTC

GH_10737740_0-1696228181741.png

Ended up finding this justt after i posted and it seems to work fine... Thanks anyhow

Translate