Frequently Asked Questions

Oct 24, 2026 - 01:02am

 [F] Frequently Asked Questions  / Common Problems and Solutions  / Troubleshooting  / Macro or template troubles.  / WCTL  /

Generating a Random Number

Rate This FAQ
 (Not yet rated)

Created On: 26 Oct 1999 12:35 pm
Last Edited: 26 Oct 1999 12:37 pm

Question Printer Friendly

How do can I generate a random number in WCTL?

Answer

In WCTL:

You can use %%time L3%% which gives a 'random' value...3 digit milliseconds.

In Server Side JavaScript (v3.1+):

%% set r "Math.random()".jsEval %%
%% r %%