Page 1 of 1

assign to variable not working

Posted: Thu Mar 17, 2016 12:18 pm
by yotamv
Hello,
I upgraded to version 6.5 and imported a task from a file.
I'm using file loop and Text loop.
I'm assigning file name to a variable and line text to a variable.
When selecting a variable or using the original imported variable the assignment is not working.
The reason is the curly brackets.
If I remove the curly brackets from the variable name in the assign line the assignment is working.
This seems to be a bug. Any advise?

Thanks you.

Re: assign to variable not working

Posted: Thu Mar 17, 2016 1:19 pm
by Oleg
No. This is not a bug.
When you specify variable name you have to specify only variable name without braces.
This described in details here: How to use variables correctly

Re: assign to variable not working

Posted: Mon Mar 21, 2016 1:55 pm
by yotamv
Thank you Oleg,
Read and understood.
Notwithstanding, there is some bug in that when using the variable button ({V}) to select the variable to assign a value to, it arrives with curly brackets.
This can be very confusing.

Regards,

Yotam

Re: assign to variable not working

Posted: Mon Mar 21, 2016 2:19 pm
by Oleg
Commonly this mechanism is designed to put variables into some expressions

For example:
Now is {DateTime}

When you want to save some value into variable as a rule you specify new variable. So It's better to type variable name manually.

But pay attention: you can compose variable name with using other variables.
For example: string{num}
If variable NUM contains the number we can get such array of variables: string1, string2, string3....stringN
This gives you more flexibility in the task.

BUT if this is too complex for you it's better to avoid this. Just put only variable name explicitly without braces.

Re: assign to variable not working

Posted: Mon Mar 28, 2016 1:08 pm
by yotamv
Thank you Oleg.