Table name as token label

Table name as token label

mariancretu_v
Not applicable
37 Views
1 Reply
Message 1 of 2

Table name as token label

mariancretu_v
Not applicable

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.

Accepted solutions (1)
38 Views
1 Reply
Reply (1)
Message 2 of 2

sebastian_hemmannE3JAU
Collaborator
Collaborator
Accepted solution

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 😉