msalemip Posted September 19, 2016 Share Posted September 19, 2016 Assume an entity is assigned to a table. So there is a row number associated to each entity from the table. Using a process for the entity, how I can get reference to the row number of that entity in a table. I will create a new entity later and I want to assign the same row number to the new entity. I know I can do the later one with "setRow" step. But I do not know how to find the row number on the fist place. Link to comment Share on other sites More sharing options...
ptkolodziejczyk Posted September 20, 2016 Share Posted September 20, 2016 I am afraid you need to go around and create a state variable within the entity to hold the row number when you set the table row. Then, for a new entity you need just to use it for the SetRow step. Link to comment Share on other sites More sharing options...
dsturrock Posted September 20, 2016 Share Posted September 20, 2016 We are considering adding this feature, but full relational tables add some complexity to it. One possibility is that when you copy an entity (for example using a Separator), by default it copies its states, including its table references, to the new entity. Another possible work-around is to add an integer column to the table, perhaps called something like MyRow. When you populate the table, put a monotonically increasing number in each cell (e.g. row 1 gets a 1, row 2 gets a 2, ...). Then at anytime you can reference MyTable.MyRow to get its current row number. Link to comment Share on other sites More sharing options...
msalemip Posted September 21, 2016 Author Share Posted September 21, 2016 thanks. I defined a state variable and it worked. Link to comment Share on other sites More sharing options...
Recommended Posts