You could do this as long as the field you are using to reset is not a pk or fk... It is best practice to always have your pk and pk with a unique value.
Setup a 3rd field for your 1-10 numbering and have it reset every time, just don't use your pk and pk keys..
hope this helps..
Care must be taken with such numbering if there is any chance that two people might be creating records for the same set of portal records. It's possible to get two records with the same serial number in that case--though record locking is likely to lock out one of the two users in most situations.
From the context of the parent record, Max ( PortalTable::Serial ) + 1 will return the next serial number in the series for a given set of portal records. You might use a button to create the new portal record that also uses this expression to assign the next serial value in the series.