AnsweredAssumed Answered

Increment Counter based on value of another field

Question asked by PrisonProfessor on Dec 4, 2013
Latest reply on Dec 5, 2013 by PrisonProfessor

Title

Increment Counter based on value of another field

Post

     I'm building a code for a single field which involves concatenating 6 fields. 4 of those fields are counters if you include the primary key field serial counter.

     Field 1 = Count field which is record Id and is configured to increment by 1 on creation of each new record

     Field 2 = A 4 character text code

     Field 3 - Count field 2  increments by 1 based on value of field 2

     Field 4 = A 3 character text code

     Field 5 - Count field 3 increments by 1 based on value of field 4

     Field 6 = Count field 4 increments by 1 based on value of both fields 2 & 4

     Field 2 currently has a list of 5 codes with the possibility of additional codes in the future

     Field 4 currently has a list of 51 codes with the possibility of additional codes in the future

     I'd also like to have the counters have either 3 or 4 leading zeros 

     I'm figuring some type of script for each count field with a bunch of nested 'if' statements and if so perhaps an example of 3 levels for each would get me going. Hopefully there is a simpler way but I'm clueless or wondering if forget automations and just do each count field  manually

     Thanks much

      

      

Outcomes