Auto number generate based on lookup/customer type
I've added an auto number generator to my form based on
http://kbase.creator.zoho.com/application/auto-increment-field-values. However I need to go a step further as the job number that will be generated in my app need to be based on which franchise the customer belongs to, so I've renamed and duplicated the '
MaxValueHolder'
form/view so that 'fr1valueholder' starts numbering at 1000, 'fr2valueholder' starts number at 2000, etc.
My confusion is how to implement changes to the validate script(s) to look at the customer type? My form contains a drop down for customer type (fr1, fr2, etc) also my customer list (linked to CRM) could also contain this selection. I've tried adding lines such as 'If custom_type = fr1' to the existing validate script with no luck. I was guessing if I could set that condition I could then add an ELSE statement that 'if customer_type = fr2' that it would use the number from the 'fr2valueholder'?