2022.2

Table Of Contents
1. ToopentheGenerateCounterWizard,selectFile > Add data > Generate counters.
2. Adjustthesettings:
l
Starting value:Thestartingnumberforthecounter.Defaultsto1.
l
Increment value:Thevaluebywhichtoincrementthecounterforeachrecord.For
example,anincrementvalueof3andstartingvalueof1wouldgivethecountervaluesof
1,4,7,10,[...]
l
Number of records:Thetotalnumberofcounterrecordstogenerate.Thisisnottheend
valuebutratherthetotalnumberofactualrecordstogenerate.
l
Padding character:Whichcharactertoaddifthecounter'svalueissmallerthanthewidth.
l
Width:Thenumberofdigitsthecounterwillhave(prefixandsuffixnotincluded).Ifthe
widthislargerthanthecurrentcountervalue,thepaddingcharacterwillbeusedontheleft
ofthecountervalue,untilthewidthisequaltothesetvalue.Forexampleforacounter
valueof"15",awidthof"4"andpaddingcharacterof"0",thevaluewillbecome"0015".
l
Prefix:Stringtoaddbeforethecounter,forexample,adding#toget#00001.Theprefix
lengthisnotcountedinthewidth.
l
Suffix:Stringtoaddafterthecounter.Thesuffixlengthisnotcountedinthewidth.
3. ClickFinishtogeneratetheCounterrecordset.
WhiletheGenerateCounterscriptisreallyusefulforthingslikeraffletickets,it'sunusableincom-
binationwithadatafileordatabase,asitcannotcomplementthatdataautomatically.Thiscanonlybe
donewithascript.Ascriptthataddsacountertodata,usingthecurrentrecordindextocalculatethe
currentcountervalue,canbefoundinthishow-to:Manualcounterindesigner.
Variable data in text: expressions
AsofOLConnect2022.2,variabledatacanbeinsertedinatemplateviaexpressions.Expressions
looklikethis:{{FieldName}}.Whenthetemplateismergedwiththedata,theexpressionsgetreplaced
withvalues.
Inpreviousversions,variabledatausedtobeinsertedinatemplateviascripts and placeholdersby
default(see"Variabledataintext:scriptsandplaceholders"onpage311).Theadvantageofexpres-
sionsisthatfewerscriptsandsometimesnoscriptsatallareneededinatemplate.
Powered by Handlebars
ExpressionsgetreplacedwithdatafromthecurrentrecordbytheHandlebarslibrarywhichisinteg-
ratedinOLConnect.FormoreinformationaboutHandlebars,see:"HandlebarsinOLConnect"on
page327.
Page 307