question

MarianCretu avatar image
1 Like"
MarianCretu asked Sebastian Hemmann answered

Table name as token label

Hello all,

Is it possible to reference a table by a token label?

For example I have 4 global tables each one for a rack.

In PF I need to write in the table which corespond to each rack. For The racks I have a token.rack label which have values like rack1, rack2 etc.

How can I define a table like Table rack_to_write = Table("token.rack");

Thank you.

tables
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Sebastian Hemmann avatar image
1 Like"
Sebastian Hemmann answered

In absence of a model I will try to write the code in here:

string TableName = token.rack;

Table rack_to_write = Table(TableName);

But this only works, if you really have a string in your label. If there is a pointer in there you maybe will have to change "token.rack" to "token.rack.as(Object).name" or something like this.

To make it easier I normaly use a Case in the Assign Label activity and set the Table pointer as a label value ;-)

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.