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
ajivlIajivlI 

Automatically populate a field based on 2 field choices

Hi all,

I would like to achieve the following scenario:
On object - Cases. Once a person selects (in case creation) the related Account (lookup) and selects one of 2 choices of a picklist (e.g. Method: Physical or Virtual), the system automatically fills in Subject field (read only for users) in a way something like: Case on AccountX for Virtual Method.
I believe I need to build a process for this action, however, I got stuck there. Was not able to properly set up conditions. 
Any help appreciated. Thank you.
Best Answer chosen by ajivlI
cczccz
No problem.
I would do it like this.
Evaluation criteria: created, and every time it's edited
Rule criteria: formula
ISCHANGED( Method__c ) || ISNEW()
this will ensure that the formula will be ran each time a record is created and each time the method is changed ( i.e. for Virtual to Physical )

Workflow action:
Field Update - Object Case - Field Subject
Formula value  
"Case on " & Account.Name & " for " & TEXT(Method__c) & " Method"

If it helps you please mark the answer as correct.

Thanks
Good luck

All Answers

cczccz
Hi,

It's enough if you create a workflow rule.
Go to Workflow Rules
Create new 
Every time a record is created 
Rule criteria = formula ISNEW() or whatever else if you need it only in certain conditions ( i.e. only when Method/Account is selected )
Add workflow action = Field Update on Case object for field Subject 
Formula: "Case on " & Account.Name & " for " & TEXT(Method__c) & " Method"
Activate 

If you need any other informations please let me know

Regards
ccz
 
ajivlIajivlI
Thank you ccz.Account and Mehod picklist field would be mandatory. When it come to setting up the rule criteria, could you please advise me how exactly it should look? Do I need to set that Account name & Method ISNEW()? Thank you
cczccz
No problem.
I would do it like this.
Evaluation criteria: created, and every time it's edited
Rule criteria: formula
ISCHANGED( Method__c ) || ISNEW()
this will ensure that the formula will be ran each time a record is created and each time the method is changed ( i.e. for Virtual to Physical )

Workflow action:
Field Update - Object Case - Field Subject
Formula value  
"Case on " & Account.Name & " for " & TEXT(Method__c) & " Method"

If it helps you please mark the answer as correct.

Thanks
Good luck
This was selected as the best answer
ajivlIajivlI
Hi, thanks again. I do receive an error: Error: Function ISCHANGED may not be used in this type of formula
 
cczccz
Please check that the Evaluation criteria is created, and every time it's edited​  (the option in the middle)
ajivlIajivlI
GREAT! thank you!