+ Start a Discussion
MCooperMCooper 

Append Text Field with Data from Another Text Field

On Opportuntities we have the default "Next Steps" field, but it's not very long and we'd like to retain back history of the progress of a deal.  I've created a long text field "Sales Progress".  Here's what I'd like to do using a workflow trigger and field update:  Whenever a new entry is made in Next Steps, copy that entry over to Sales Progress and add it to the bottom (or top) of the existing text.  What would the formula look like?
Best Answer chosen by MCooper
sfdc_ninjasfdc_ninja
You would want to create a workflow rule on the Opportunitiy object.

For evaluation criteria, you would want to use 'created, and every time it’s edited'.  

The Rule Criteria would be 

ISCHANGED(NextStep)

Then for an action, you would create a field update.  The update would be on the Sales_Progress__c field.  You would use a formual to set the new value.  The formula you would want to use would be 

Sales_Progress__c + BR() + BR() + $User.LastName + ', ' + $User.FirstName + ' ' + TEXT(Today()) + ' - ' + NextStep

This appends the the next step field to your custom sales progress field.  It also adds the user and the date so you know who made the change and when, so it should show a decent chronological story of the opportunity.  

Hope that helps

All Answers

sfdc_ninjasfdc_ninja
You would want to create a workflow rule on the Opportunitiy object.

For evaluation criteria, you would want to use 'created, and every time it’s edited'.  

The Rule Criteria would be 

ISCHANGED(NextStep)

Then for an action, you would create a field update.  The update would be on the Sales_Progress__c field.  You would use a formual to set the new value.  The formula you would want to use would be 

Sales_Progress__c + BR() + BR() + $User.LastName + ', ' + $User.FirstName + ' ' + TEXT(Today()) + ' - ' + NextStep

This appends the the next step field to your custom sales progress field.  It also adds the user and the date so you know who made the change and when, so it should show a decent chronological story of the opportunity.  

Hope that helps

This was selected as the best answer
MCooperMCooper
Thanks, Ninja!  I had everything except the formula, which works perfectly!  I do appreciate that you included all the details, though, as quite often I don't have all the pieces lined up!  
Olatte_nycOlatte_nyc
great solution.  do you know how to prepend the history? so the most recent is always on top? 
Bianca Pahuta 5Bianca Pahuta 5
I came across this solution when I most needed it.
Thank you for describing the steps so well!

Is there any way we can display the newest /latest line on the top instead of adding it in the bottom ?


Thanks,
Bianca
Lara WasowskiLara Wasowski
I've tried setting this up, but if my previous value had line breaks in it, these disappear when the field is updated.

Initial value:
Opened - 10/21/2017
New - 10/20/2017

Now I want to add a new line "Working - 10/24/2017" and have it look like this:
Working - 10/24/2017
Opened - 10/21/2017
New - 10/20/2017

But instead it shows up like this
Working - 10/24/2017
Opened - 10/21/2017New - 10/20/2017

suggestions?
AshishkAshishk
Hi Lara,

Please try below solution to remove line breakes from original field and then add it to history field.

https://success.salesforce.com/answers?id=90630000000DNcNAAW

Hope this helps.

Thanks,
Ashish
MCooperMCooper
This is still working great for us, but I keep getting requests to prepend the data so the new comments appear at the top rather than at the bottom.  I'm not finding any situations where this has been done.  Is it possible?
Jesse WolffJesse Wolff
Just rearrange the formula:

$User.LastName + ', ' + $User.FirstName + ' ' + TEXT(Today()) + ' - ' + NextStep + BR() + BR() + Sales_Progress__c
Jasmeen Kaur 22Jasmeen Kaur 22
Hi Experts

I know this rule works perfectly fine for Text values. What If i want to add Append Discount fileds (Percentge or number)

Actually the case is,
On Case Object, I created a field "Discount" and "Discount History". In our organisation, time to time we offer certain discount to our customers and I tried creating something to track the discount history like when was the last discount given to this account and last discount value based on above rule and formula. 
"But I am getting error that expected TEXT and recieved number" because discount is a number.

Any help will be highly appreciated.
Thanks
Mj bavanMj bavan
thanks for sharing your problems and thoghts   tamilgun rockers (https://tamilgunrockers.com)  Moviesraja (https://alllyricss.com/moviesraja-2020/) Moviezilla (https://alllyricss.com/moviezilla-2020/)