Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, does anyone know how to avoid dollar sign expansion during script execution???, for example, I want to declare a variable in the script like this:
set x = "sum({$<Field = {$(var)}>} Amount)";
I want the value to be set literally in the variable, without expanding $(var).
Any ideas?
Thanks in advance.
Regards
Hi
Not sure if the above works, because I find that you have to use LET rather than SET to avoid the dollar expansion during reload, the LET command means "put this exact text into a variable" whereas SET will often evaluate at least part of the command (including dollar expansion).
Also, I have found that on the dollar expansion side of things, I need to use a chr() command to ensure it works, so I would make the statement as follows:
LET x = 'Sum ( { $ < Field = {"' & chr(36) & '(var)} > } Amount )';
Chr(36) is obviously the dollar sign!
Good luck,
have you tried splitting the expression into two and concatanating into the variable, e.g.
set x = "sum({$"&"<Field = {$(var)}>} Amount)";
Hi
Not sure if the above works, because I find that you have to use LET rather than SET to avoid the dollar expansion during reload, the LET command means "put this exact text into a variable" whereas SET will often evaluate at least part of the command (including dollar expansion).
Also, I have found that on the dollar expansion side of things, I need to use a chr() command to ensure it works, so I would make the statement as follows:
LET x = 'Sum ( { $ < Field = {"' & chr(36) & '(var)} > } Amount )';
Chr(36) is obviously the dollar sign!
Good luck,
Hi,
pardon Nigel, but you forgot the quotes at the end:
LET x = 'Sum ( { $ < Field = {"' & chr(36) & '(var) "} > } Amount )';
Hi Martina
Well spotted!
Apologies for that one.......
Thank you so much Nigel and Martina. I thought it was imposible.
Regards,
Ivan