04-16-2019 02:54 AM
I would like to write and expression that will get the value from container (EnergyRegister_1) and save it to RegisterAddress using the RegisterCounter as indexer.
Solved! Go to Solution.
04-16-2019 04:14 AM
Use
locals.RegisterAddress.locals.EnergyRegister_1.GetNthSubProperty(“”,locals.RegisterCounter-1,0).GetValString(“”,0)
the first field in the container is at index 0. The GetNthSubProperty() returns a property object, then use that as the reference for getting the actual value.
04-16-2019 04:30 AM
Thank you for "GetValString(“”,0) ". I was struggling dealing with the return of the property object.
I had a workaround but your solutions runs well.
WORKAROUND
Locals.RegisterAddress = Locals.EnergyRegister_1.GetNthSubPropertyName("",0,0)
Locals.RegisterAddress = Locals.EnergyRegister_1.GetValString(Locals.RegisterAddress,0)