Jump to content
msalemip

row number

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×