I wanted to generate number as per region and division like..

I have four regions: Africa, America, Asia, Oceania and divisions are Electrical MEP HVAC Plumbing also, it should consider financial year as per one date filed named as 'Enquiry received date' e.g. If the inquiry received date is 1st April 2019, and region is America, the division is MEP then Numbers should be AM-19-20-ME-001 (AM-America, 19-20 - enq received year, ME-MEP, 001 and so on) & If the enquiry received date is 1st April 2019, and region is Asia, division is Electrical then Numbers should be AS-19-20-EL-001

1 Answer 1


If you don't have the requirement to be able to repeat the final number for multiple "types" of region or divisions (like 01 for EL and a 01 for EM), then you are good to use an autonumber field and a formula.

You probably have some fields to store the region and division, then you can use the CreatedDate field to obtain the year, and append the autonumber field at the end.

Something like this:

TEXT(Region__c) & '-' & RIGHT(TEXT(YEAR(CreatedDate)), 2) & '-' & 
LEFT(TEXT(YEAR(CreatedDate)), 2) & '-' & TEXT(Division__c) & '-' & TEXT(AutoNumber__c)

I have not tested the above formula, but you get the idea.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .