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
Selvakumar Anbazhagan 12Selvakumar Anbazhagan 12 

Need help on Formula Field in Opportunity

Hi Everyone,

I having issue to create a new formula field in opportunity. 

When i was try to create a formula field in opportunity that to categorize the channels (Inbound,outbound,Agent or Carrier) using various objects (Profile,Username,Recordtype).

For example,if certain "Profile" users creating an opportunity i need to tag the field as "Inbound" or "Agents" or "Carrier". As well if any opportunity created under specfic record type need to tag the field as "Carrier".If certain users created opportunities need to tag as "Agents" or "Carrier".

I have created this below formula. But when check syntax it shows an error.

Is my formula logic is correct? If not how i can deal it to meet my requirement? Any help on this.

OR
/* Categorize channel using Profile */
(CASE(Owner.Profile.Name, 
"Account Executive", "Outbound", 
"Commercial Bulk Executive", "Bulk", 
"Inbound Sales", "Inbound", 
"Outside Sales Agent", "Agent", 
"Sales Director/Manager", "Mgmt", 
"Other" 
),  

 /* Categorize channel using owner name */
CASE(Owner.User.Name, 
"Maria Martinez", "Agent",
"Michael Smith​","Carrier",
"Robert Johnson","Carrier",
"Other"
),

/* Categorize channel using  recordtype */
if(RecordType.Name="Carrier Devices","Carrier","Other")
)  


Thanks in advance.

 
VIGNESH BALASUBRAMANIANVIGNESH BALASUBRAMANIAN
Hi Selvakumar,

Try this,

CASE(Owner.Profile.Name, 
"Account Executive", "Outbound", 
"Commercial Bulk Executive", "Bulk", 
"Inbound Sales", "Inbound", 
"Outside Sales Agent", "Agent", 
"Sales Director/Manager", "Mgmt", 
"Other" +
CASE( Owner.Username , 
"Maria Martinez", "Agent",
"Michael Smith​","Carrier",
"Robert Johnson","Carrier",
"Other" +
if(RecordType.Name="Carrier Devices","Carrier","Other")
))



Thanks & Best Regards,
Vignesh.B
Selvakumar Anbazhagan 12Selvakumar Anbazhagan 12
Hi Vignesh,

Thanks for the help. This formula works. But,i am getting all the 3 values when the condition satisfies all the 3. For example am getting value as "OtherOtherCarrier".

As per my requirement any one of the condition only should satisfy. I should get only one value.

Even i tried or condition on it. But again throws error.

Any solution for this?

Thanks in advance.

Selva

 
VIGNESH BALASUBRAMANIANVIGNESH BALASUBRAMANIAN
Hi Selva,

Yes,If all the 3 statements are true means result would be like this only.

My suggestion is,Better you have 3 different custom fields and separate formula  like ,

Owner_Profile_Name:

CASE(Owner.Profile.Name, 
"Account Executive", "Outbound", 
"Commercial Bulk Executive", "Bulk", 
"Inbound Sales", "Inbound", 
"Outside Sales Agent", "Agent", 
"Sales Director/Manager", "Mgmt", 
"Other" )

Owner_Username:

CASE( Owner.Username , 
"Maria Martinez", "Agent",
"Michael Smith​","Carrier",
"Robert Johnson","Carrier",
"Other")

RecordType.Name:

if(RecordType.Name="Carrier Devices","Carrier","Other")


Try this or Let me know for further things.

Thanks & Best Regards,
Vignesh.B
 
Selvakumar Anbazhagan 12Selvakumar Anbazhagan 12
Thanks Vignesh.

Am should use all these into a single field only. It not make sense to use three different fields.


Is it any way to acheive in some other way?

Thanks.