I'm trying to integrate a numbering system that allows users to visually identify related portal rows.
I've successfully developed a portal that allows the user to create new portal rows. For example, portal rows with number fields of: "17.00", "17.01", "17.02, "17.03", etc. The integer part indicates relatedness while the decimal part indicates how many variations.
There's an "Add" button outside the portal to add a blank portal row. This creates a new record and creates a number to the next highest integer. Adding a brand new row after "38.03" would be "39.00". There's also a "Duplicate" button that shows on each portal row which creates a carbon copy of whichever row is selected...then the user can tweak to create a variation. Duplication adds ".01" to the number field on the new portal row. was duplicated. So a record of "38.03" would be duplicated as "38.04".
The problem I've encountered is that the user might duplicate say "38.03" multiple times. Unless the user creates a duplicate from the very last variation, there's a chance of confusion because it's very possible there could be several portal rows with a number field of say "38.04".
I've done this with scripting so far, but maybe a calculation would be a better approach. At any rate, is there a way for the script to check if the decimals have already been used...and then add .01 to the highest decimal found in the related set? Or perhaps there's another way.
Any help would be greatly appreciated.