How to insert a calculation based on a variable in a selector?

Hi everyone,

Using CE 2019.7
Right, so…long story short, i need to insert an integer variable (MyIntegerVariable) in two places inside a selector. The second place it is inserted i need its’ value doubled, kind of like so:

<ctrl name='{{MyIntegerVariable}}' role='row' />
<ctrl role='cell' />
<nav up='2' />
<ctrl name='drop' role='celldrop' idx='{{MyIntegerVariable * 2}}' />

I just haven’t been able to find the syntax to do so, without creating another variable.
It used to be that you would use ++ and place whatever you needed inside, like

+Convert.ToString(MyIntegerVariable * 2)+

I might have missed something at some point bc it doesn’t work like that anymore.
Any help is highly appreciated, thank you!

@Serban

Please try like below and check.

idx=’"+MyIntegerVariable*2+"’ />

1 Like

@Manjuts90 thank you for the reply

It was pretty close, just had to get rid of the double quotes. So what worked was:

idx='+{{MyIntegerVariable}}*2+'
1 Like

whoops, sorry, did some further testing and it appears it is not working. i’m just going to use another variable and be done with it. thank you for your help

unless anyone has other ideas? :))