Best of Support

Suppress and force results

 

I thought the following might be useful ...

For anyone who is using scripts extensively, like I am, to simplify coding it is good to know when a script gets executed, when the result in put into the template, and also, what happens when a variant is set a script. The following are the results that I found after extensive testing that should be a guide to everyone else.

 

FILLPOINT

RESULT

%[^________]

Will force result into document.

%[~_________]

Will suppress variable or result of script.

%[x= _____ ]

Will force execution of script, but not put in any result.

%[index=0]

Sets index to "0" but no resulting value.

%[^index=index + 1]

Adds "1" to Index and puts in the current value of Index.

%[~Scripts.Selectr('\Demo','DemoGFS']

Will run the DemoGFS script but suppress the result.

%[Scripts.Select('\Demo','DemoGFS']

Will run the DemoGFS script and put in the result.

%[x=Scripts.Select('\Demo','DemoGFS']

Will run the DemoGFS script and set "x" to the result.

%[x]

Will show the value of the DemoGFS when "x" was last set.

%[^x=Scripts.Select('\Demo','DemoGFS']

Will run the DemoGFS script, set X to the result and Display the result.

 

Have fun! Read this closely and memorize.

 

Seth Rowland