function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tag LeeTag Lee 

Initial auto number criteria based on picklist value

Hi all,

I have one picklist field named DEPT_Function__c. and the values for the field are TTL,SSC,ESS, and LSS 

I have already created an Auto number field named Audit_Number__c

I would like to update the intial auto number criteria based on the slection of the picklist value - Ex - TTL-{YY}-{000} or SSC-{YY}-{000}

Please suggest a formula. I tried a few formulas with no luck :( 

Thanks in Advance
Tejender Mohan 9Tejender Mohan 9

A solution could be using the trigger.
You can Try the following steps (I have not tested it)
1. Create an extra auto number field like tempNumber(just for backend use, not in layout) with value {YY}-{000} .
2. Make Audit_Number__c a Text Field.
3. Create a process Builder  for the newly created records and on action update the value of Audit_Number__c with formula 


(concatination of two fields)
It might work.

Tejender Mohan