Numbering Records within Records

Am creating related records via a method

waves_to_waveactions.newRecord();
waves_to_waveactions.actionnumber = waves_to_waveactions.getMaxRecordIndex();
waves_to_waveactions.projectid = coachhouseid;
waves_to_waveactions.clientid = clientid;

This works fine except if I have to delete one of those actions and now I have a gap in the sequence.

Would I use a FOR loop to go through and reset the actionnumbers on record deletion and if so, how would that look? or would I set the actionnumber as the row number since they are displayed in a portal?

TIA

if you are using actionnumber only for numbering the lines I would:

-add a label/button to your portal
-set the text property with a standard tag %%currentRecordIndex%%
-activate “displaytag” property

maarten:
if you are using actionnumber only for numbering the lines I would:

-add a label/button to your portal
-set the text property with a standard tag %%currentRecordIndex%%
-activate “displaytag” property

Unfortunately I also need to display the action numbers in an html report. TIA

Hi Michael,

Assuming that you are looping through the records to build the HTML block, can you not include the loop iteration inside that block which would give you the item number ?

Cheers
Harry

Perfect. Used %%currentRecordIndex%% to number the rows and then grabbed the # in compiling the html report. Thanks Maarten and Harry.