Tuesday, May 14, 2019

Ability to concatenate two field values and assign the new value to another field via Workflow


Below are the steps on how to concatenate two field values using "CONCAT" function for server side action and "+" for client side action via SuiteFlow  
  
1. Navigate to  Customization > Workflow > Workflows > New   
    - Name: [KB] Concat Fields   
    - Record Type : Custom Record 101 {any record but as a sample custom record is selected}   
    - Initiation : check "On Create" and "On Update"  
    - Trigger Type : All  
    - Execute as Admin : checked  
    - Enable Logging: checked  
    - Release Status: Released   
2. Click Save   
3. Click New State    
     - Name: Concat 2 Fields State      
4. Click Save    
5. On "Concat 2 Fields State" state, on Actions Tab > Click New Action button     
6. Click Set Field Value Action    
    - Trigger On: After Record Submit    
    - On Paramater section    
       -- Field : select "Name"    
       -- Select Formula  and add the following :    
           CONCAT({customfieldid1}|| ' ', {customfieldid2})    
7. Click Save    
8. Navigate to Setup > Customization > Record Types > Click List on the Custom Record 101   
9. On the list, click Edit beside the record    
    - Field 1 = "test"   
    - Field 2 {dropdown} = select High Priority   
10. Click Save   
   
Result: Name = "test High Priority"        
   
*This is also possible using client side workflow (After Field Edit)   
   
11. Click Set Field Value Action   
       - Trigger On: After Field Edit   
       - Condition: {customfield1} is not Empty //need to check first if one of the two field is not empty   
       - Client Fields : Field 2     
       - On Paramater section   
          -- Field : select "Name"   
          -- Select Formula  and add the following :   
      {customfieldid1}+ " " + {customfieldid2}  
12. Click Save     

1 comment: