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
Bhagyashri Jadhav 61Bhagyashri Jadhav 61 

Formula In process builder for task.

Hi Team, I have a process builder which creates a task for me in the subject line currently I am using formula as in  "AUTO-TASK: " + "Please add " + [Employee_Onboarding_Checklist__c].Contact__c.FirstName  + " " + [Employee_Onboarding_Checklist__c].Contact__c.LastName + " to the payroll."

Now I wanted to ad the territory name in this subject line formula, Problem is territory is a picklist field. can someone please suggest the formula? 

ex: Ideally this would read like this example “AUTO-TASK: Germany – Please add Susan Smith to the payroll.”

 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Bhagyashri,

Can you confirm on which object do we have that territory field. Is it on Contact object ?

Thanks,
 
Bhagyashri Jadhav 61Bhagyashri Jadhav 61
No, I have a custom object called "Employee Onboarding Checklist"
Sai PraveenSai Praveen (Salesforce Developers) 
Hi ,

Your formula can be as below . Just replace territory__c with the API name of the object
 
AUTO-TASK: " + "Please add " + TEXT([Employee_Onboarding_Checklist__c]. territory__c) + [Employee_Onboarding_Checklist__c].Contact__c.FirstName  + " " + [Employee_Onboarding_Checklist__c].Contact__c.LastName + " to the payroll."

Let me know if you face any error.

If this solution helps, Please mark it as best answer.

Thanks,
 
Bhagyashri Jadhav 61Bhagyashri Jadhav 61
Hi Sai, The formula expression is invalid: Syntax error. Extra '" + "' Error Bhagyashri Jadhav Salesforce Administrator ​ ​Topsource Worldwide (UK) Ltd (Company No. 04626779, incorporated in England and Wales). Registered Office: Office 807, Labs House 15 19, Bloomsbury Way, London, England, WC1A 2TH IMPORTANT: The information contained in this e-mail message, together with any attachments thereto, are intended only for the ​personal and confidential use of the addressee(s) named above. The message and the attachments are or may be a privileged or ​protected communication. If you are not the intended recipient of this message, or authorized to receive it for the intended ​recipient, you have received this message in error. If you received this message in error, you are not to review, use, disseminate, ​distribute or copy it or any attachments and are requested to immediately notify us by return e-mail message, and delete the original message.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

One quotation was missing at the start. I have corrected it now.
 
"AUTO-TASK: " + "Please add " + TEXT([Employee_Onboarding_Checklist__c]. territory__c) + [Employee_Onboarding_Checklist__c].Contact__c.FirstName  + " " + [Employee_Onboarding_Checklist__c].Contact__c.LastName + " to the payroll."

If this solution helps, Please mark it as best answer.
Bhagyashri Jadhav 61Bhagyashri Jadhav 61
Error: The formula expression is invalid: Syntax error. Missing '=' Bhagyashri Jadhav Salesforce Administrator ​ ​Topsource Worldwide (UK) Ltd (Company No. 04626779, incorporated in England and Wales). Registered Office: Office 807, Labs House 15 19, Bloomsbury Way, London, England, WC1A 2TH IMPORTANT: The information contained in this e-mail message, together with any attachments thereto, are intended only for the ​personal and confidential use of the addressee(s) named above. The message and the attachments are or may be a privileged or ​protected communication. If you are not the intended recipient of this message, or authorized to receive it for the intended ​recipient, you have received this message in error. If you received this message in error, you are not to review, use, disseminate, ​distribute or copy it or any attachments and are requested to immediately notify us by return e-mail message, and delete the original message.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Just try adding + TEXT([Employee_Onboarding_Checklist__c]. territory__c)  to the existing formula . or like you add other field add the field and put Text() for that field. This should solve the issue.

Thanks,
 
Bhagyashri Jadhav 61Bhagyashri Jadhav 61
I have already tried that "AUTO-TASK: " + TEXT([Employee_Onboarding_Checklist__c]. territory__c) + "Please add " + [Employee_Onboarding_Checklist__c].Contact__c.FirstName + " " + [Employee_Onboarding_Checklist__c].Contact__c.LastName + " to the payroll." I am getting error as : The formula expression is invalid: Syntax error. Missing '=' Bhagyashri Jadhav Salesforce Administrator ​ ​Topsource Worldwide (UK) Ltd (Company No. 04626779, incorporated in England and Wales). Registered Office: Office 807, Labs House 15 19, Bloomsbury Way, London, England, WC1A 2TH IMPORTANT: The information contained in this e-mail message, together with any attachments thereto, are intended only for the ​personal and confidential use of the addressee(s) named above. The message and the attachments are or may be a privileged or ​protected communication. If you are not the intended recipient of this message, or authorized to receive it for the intended ​recipient, you have received this message in error. If you received this message in error, you are not to review, use, disseminate, ​distribute or copy it or any attachments and are requested to immediately notify us by return e-mail message, and delete the original message.