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?
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 ?