Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to put a formula into a Variable (in the script), but the generator puts out an Script Line Error:
LET vL.FieldSelection_Plus1='=if(right(GetFieldSelections(Selection),2)= '51' or right(GetFieldSelections(Selection),2)= '52', left(GetFieldSelections(Selection),4)+1 &'01',GetFieldSelections(Selection)+1)'; // 2. Kickout, -2 to +1 from Selection
In a Textbox this script works, but how to put it in a variable in the script?
I am happy for any hint.
Kind Regards,
Chris
May be try with SET instead of LET
SET vL.FieldSelection_Plus1 = =if(right(GetFieldSelections(Selection),2)= '51' or right(GetFieldSelections(Selection),2)= '52', left(GetFieldSelections(Selection),4)+1 &'01',GetFieldSelections(Selection)+1);
May be this?
LET vL.FieldSelection_Plus1 = if(right(GetFieldSelections(Selection),2)= '51' or right(GetFieldSelections(Selection),2)= '52', left(GetFieldSelections(Selection),4)+1 &'01',GetFieldSelections(Selection)+1);
Then create text object and use $(vL.FieldSelection_Plus1) and then see
May be try with SET instead of LET
SET vL.FieldSelection_Plus1 = =if(right(GetFieldSelections(Selection),2)= '51' or right(GetFieldSelections(Selection),2)= '52', left(GetFieldSelections(Selection),4)+1 &'01',GetFieldSelections(Selection)+1);
I did it like you suggested, without '' (comma) and with the SET command. It works in the frontend with a textbox with =vL.FieldSelection_Plus1
Very strange, I thought SET is not computing ... and would need $(), but somehow it works without...