0

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

0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.