Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
tahirkhalil
Creator
Creator

Using Field Value as Variable Name

Hi,

I am supposed to define a dynamic threshold for compliance values. For that I am using inline table to define variables within the table, which is defined as variable for slicer.

See below the code:

[COMPRULE]:

LOAD * INLINE [

    Variable, Value, StoreType

    Var1, 5, A

    Var2, 3, B

    Var3, 2, C

];

// This is to set default values to variables:

Let x=NoOfRows('COMPRULE')-1;

Trace $(x);

For counter = 0 to NoOfRows('COMPRULE')-1

Trace $(counter);

Let Variable1 = peek('Variable', $(counter));

Let Value = peek('Value', $(counter));

Let $(Variable1) = $(Value);

Trace $(Variable1), $(Value);

Next counter

Now I need to access the corresponding value against each variable for calculation.

Can someone please check the attached doc and suggest me how can I get the value from field and get corresponding value from stored variable name.

11 Replies
tahirkhalil
Creator
Creator
Author

Can you please look into my last reply below and suggest anything?

tahirkhalil
Creator
Creator
Author

Hi,

I need another help - can you please look into my last posting?