richfmartin1 Posted June 21, 2019 Share Posted June 21, 2019 I would like to reference state values associated with objects within a data table. For example, suppose I have a Data Table, call it Tab1, with an Object Reference column called Obj. The first entry in the object reference column is a resource called Res; thus, Tab1[1].Obj points to Res. How do I access the value of Res.CurrentCapacity using the table reference? To make this a little more complex, what if the state were a vector of integers? Thus, what I would like to reference would be something like Res.vector1[1]. Link to comment Share on other sites More sharing options...
GFurtado Posted June 21, 2019 Share Posted June 21, 2019 (state where the object is stored).(type of the object).(expression) So, in your example you should type: Tab1[1].Obj.Resource.CurrentCapacity. Same logic applies to object state variables. If you want to know the current capacity of a resource stored in a object state variable named ObjState, call it as ObjState.Resource.CurrentCapacity. I attached a file if you want to see it in action. I'm not sure if this works with vectors, I never tried it. Object Referencing.spfx Link to comment Share on other sites More sharing options...
richfmartin1 Posted June 21, 2019 Author Share Posted June 21, 2019 Thank you very much. Worked perfectly, even with vector states. Link to comment Share on other sites More sharing options...
Recommended Posts