Progress - Compare Two Strings and Show Difference

All right here is a rough way I would do this pulling it out of thin air


I would Split the words by space. So you end up with an “Array” of words. Then I would compare array[0] to arraynew[0] if the words are not the same I would prepend / post pend <b> </b> (if you are using HTML Email) then you would end up with two strings like this

Original: Hey this is an awesome comment
New : Hey this is <b>a</b> <b>really</b> <b>awesome</b> <b>comment</b>


Obviously this would just show you where the change began… but its something? IDK just pulled it out of thin air it may be hair brained…


Jose C Gomez
Software Engineer



T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Thu, May 29, 2014 at 2:22 PM, 'Vic Drecchio' vic.drecchio@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <p></p><div><p class="ygrps-yiv-1298220563MsoNormal">I&#39;m trying to simplify an email alert BPM.  I have an alert that triggers when someone updates Sales Order comments.  It sends an email with &quot;These were the BEFORE comments&quot; and now &quot;These are the NEW comments&quot;.  Sometimes our comments can be a few paragraphs with specific instructions.  Rather than have the user ascertain what has changed Before and After in the comments, I wanted to compare TTOrderHed.OrderComment to OrderHed.OrderComment in the BPM and only show the difference.<u></u><u></u></p>

Â

In SQL…. doable. I've searched the Progress Ref Guide and Bing'd it and found nothing that jumped out at me.Â

Â

Has anyone done something like this?

Â

TIA!

Â

Â

-Vic

</div>
 


<div style="color:#fff;min-height:0;"></div>

I'm trying to simplify an email alert BPM.  I have an alert that triggers when someone updates Sales Order comments.  It sends an email with "These were the BEFORE comments" and now "These are the NEW comments".  Sometimes our comments can be a few paragraphs with specific instructions.  Rather than have the user ascertain what has changed Before and After in the comments, I wanted to compare TTOrderHed.OrderComment to OrderHed.OrderComment in the BPM and only show the difference.

 

In SQL…. doable.  I've searched the Progress Ref Guide and Bing'd it and found nothing that jumped out at me. 

 

Has anyone done something like this?

 

TIA!

 

 

-Vic