[SalesForce] Salesforce Formula Text Value Based on Custom Field Picklist Value

Basically, on Cases, I have:

Department(picklist values=Ecom, B2B, etc.)

Manager(text field)

Employee 1(text field)

Employee 2(text field)

Employee 3(text field)

Employee 4(text field)

This is what I am trying to do in real time, not on save (workflow rule won't work because it only does field updates after creating the ticket, not during the creation of it):

IF(ISPICKVAL(Department__c, "Ecom"),Employee_1__c="John Smith", Employee_2__c="Jane Doe", etc.)

It keeps telling me I can't use a formula on the picklist field so then I tried to do it on each of the employee fields but they are not formula and only text fields.

I created another field that is Formula(text) and put in a formula:

IF(ISPICKVAL(Department__c,"Ecom"),"test",null)

This works but only for the formula(text) field, if I try to have it update the other text fields, it also does not allow me to do this and gives a boolean error, tried replacing null with "false" "true" with no difference.

Best Answer

This is something that you cannot do with a formula field.

A formula field evaluates to a single value and can look at other fields to do this. It can't set any other field values other than it's own.

To do this, probably the easiest way would be a process (Open the the process builder and make a new process)

You could also do this with several workflows. Each workflow would have to evaluate branch of the logic.

The process would look something like this:

enter image description here

Related Topic