Best of Support

Auto-numbering items in a collection

Issue

How do you auto-number items appearing in a list of sub-collection items?

Solution:

Create a collection out of the items selected in the list:

%[ListCol=Lists.CSVToCol(MyDialog.MyList)]

 

Option 1:  Simply use the Microsoft Word "AutoNum" field to number the selections:

%[ForEachBlock('Item', ListCol)]a. %[Item]

%[EndBlock]

 

Option 2:  Create a script to convert numbers to letters (this will probably be a built-in task in the next release):

%[SetBlock("Alpha")]%[Element(i, "a,b,c,d,e,f,g,h,I,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z", ",")]%[EndBlock]

 

Then:

%[i=1]%[RepeatBlockWhile(i<=ListCol.count)]%[Alpha]. %[ListCol[i]]

%[i=i+1]%[EndBlock]

 

Daniel Todes