How to use variables to specify attributes
Question


Hi guys.

Please check the image. I forgot how to write them...

Could you give me how to write there?


Thanks

Hi Yumiko,

Not sure if I understand your question correctly, but is this what you're trying to achieve?


This will set the value of TFCount to the value of TF1Count in case variable equals 1, to the value of TF2Count in case variable equals 2 and to the value of TF3Count in case variable has any value other than 1 or 2.

Kind regards,
Jeroen

I certain it will work to use "if". But I feel like there are other way... 

I'll write like that.

Thanks your advice!


Hello Yumiko,

I did not get your question. Actually what you are trying to achieve. can you please provide us sample OML. 

So we will able to provide you better answer.

Kind Regards,

Ajit kurane.

Thanks your reply!

I think easiest way is  the answer by by Jeroen Barnhoorn, so I'll do them.

Hi  Yumiko,

You cannot call integer variable between expression variable name . But you can use integer variable with if condition to implement your requirement as mentioned by Jeroen Barnhoorn.

Thanks, Aadhavan S

I tried to use if condition on them, and there were all working.

Thanks your reply!

Hi Yumiko,

Jeroen solution will do the trick if you're dealing with a small number of variables. If you're looking for a more dynamic way to handle a larger number of variables you can programmatically append your TFvariables (TF1Count, TF2Count etc.) to a simple text list and pass in your variable number as the index of the TFvariables you want to be returned:

The resulting behaviour would be as follows:

TFCountList[0] = TF1Count,

TFCountList[1] = TF2Count,

...

TFCountList[n] = TFnCount


Regards,

Ossama

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.