Find and Replace BPM

ok, no worries, thank you.

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> No offense man, but the info I gave you is the best i've got, lets try again
>
> If you have the string
>
> " *A person's a person, no matter how small.* "
> And you run
>
> Replace ("*A person's a person, no matter how small.* "," * person's a
> person* ","elephant is loopy")
>
> You'll get A elephant is loopy, no matter how small...
>
>
> you can put it in a loop as such
>
> FOR EACH Part:
> Assign Part.PartDesc = REPLACE(Part.PartDesc, "STUFF I DONT LIKE","THING I
> LOVE")
> END.
>
> Hope this helps!
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Fri, Feb 3, 2012 at 8:47 AM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> > **
> >
> >
> > We have part descriptions that are like the following:
> >
> > SWLR blah blah blah
> >
> > blah blah SWLR blah blah
> >
> > blah blah SWLR
> >
> > Would this still ensure I keep all the blah blah's?
> >
> > How do I incorporate this into my code?
> >
> > Thanks again.
> >
> >
> > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >
> > > Naw captain.
> > > REPLACE ( source-string , from-string , to-string ).
> > >
> > > All three of those arguments need to be replaced with the actual data.
> > > Stick it in the middle of your loop and you should be ok.
> > >
> > >
> > > On Fri, Feb 3, 2012 at 8:34 AM, michael.hutcheson@ <
> > > michael.hutcheson@> wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Thanks for this.
> > > >
> > > > Do I litterally just use the words source-string? I was planning on
> > > > running this on-mass so the descriptions will be all be slightly
> > different.
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > > > >
> > > > > REPLACE ( source-string , from-string , to-string )
> > > > >
> > > > > *Jose C Gomez*
> > > > > *Software Engineer*
> > > > > *
> > > > > *
> > > > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > > > *
> > > > > *T: 904.469.1524 mobile
> > > > > E: jose@
> > > >
> > > > > http://www.josecgomez.com
> > > > > <http://www.linkedin.com/in/josecgomez> <
> > > > http://www.facebook.com/josegomez>
> > > > > <http://www.google.com/profiles/jose.gomez> <
> > > > http://www.twitter.com/joc85>
> > > > > <http://www.josecgomez.com/professional-resume/>
> > > > > <http://www.josecgomez.com/feed/>
> > > > > <http://www.usdoingstuff.com>
> > > > >
> > > > > *Quis custodiet ipsos custodes?*
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@ <
> > > > > michael.hutcheson@> wrote:
> > > > >
> > > > > > **
> > > > > >
> > > > > >
> > > > > > Hey folks,
> > > > > >
> > > > > > Is it possible to perform a find and replace BPM? What I want to
> > > > achive is
> > > > > > only replace specific words in the parts descriptions, and leave
> > the
> > > > rest
> > > > > > of the description intact.
> > > > > >
> > > > > > I was thinking of using a BPM with 4GL code:
> > > > > >
> > > > > > for each Part where ( Part.PartDescription MATCHES
> > '*SWLR*')no-lock:
> > > > > > Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> > > > > > 'PartDescription','Swivel- Long radius').
> > > > > >
> > > > > > However, this will overright the entire description, I only want to
> > > > > > replace 'SWLR' with 'Swivel- Long radius' - any ideas?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Michael
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > [Non-text portions of this message have been removed]
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking
> > > *
> > > *:: 904.962.2887*
> > > *:: waffqle@*
> >
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Hey folks,

Is it possible to perform a find and replace BPM? What I want to achive is only replace specific words in the parts descriptions, and leave the rest of the description intact.

I was thinking of using a BPM with 4GL code:

for each Part where ( Part.PartDescription MATCHES '*SWLR*')no-lock:
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'PartDescription','Swivel- Long radius').

However, this will overright the entire description, I only want to replace 'SWLR' with 'Swivel- Long radius' - any ideas?

Regards,

Michael
REPLACE ( source-string , from-string , to-string )

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

> **
>
>
> Hey folks,
>
> Is it possible to perform a find and replace BPM? What I want to achive is
> only replace specific words in the parts descriptions, and leave the rest
> of the description intact.
>
> I was thinking of using a BPM with 4GL code:
>
> for each Part where ( Part.PartDescription MATCHES '*SWLR*')no-lock:
> Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> 'PartDescription','Swivel- Long radius').
>
> However, this will overright the entire description, I only want to
> replace 'SWLR' with 'Swivel- Long radius' - any ideas?
>
> Regards,
>
> Michael
>
>
>


[Non-text portions of this message have been removed]
Thanks for this.

Do I litterally just use the words source-string? I was planning on running this on-mass so the descriptions will be all be slightly different.

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> REPLACE ( source-string , from-string , to-string )
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> > **
> >
> >
> > Hey folks,
> >
> > Is it possible to perform a find and replace BPM? What I want to achive is
> > only replace specific words in the parts descriptions, and leave the rest
> > of the description intact.
> >
> > I was thinking of using a BPM with 4GL code:
> >
> > for each Part where ( Part.PartDescription MATCHES '*SWLR*')no-lock:
> > Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> > 'PartDescription','Swivel- Long radius').
> >
> > However, this will overright the entire description, I only want to
> > replace 'SWLR' with 'Swivel- Long radius' - any ideas?
> >
> > Regards,
> >
> > Michael
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Naw captain.
REPLACE ( source-string , from-string , to-string ).

All three of those arguments need to be replaced with the actual data.
Stick it in the middle of your loop and you should be ok.


On Fri, Feb 3, 2012 at 8:34 AM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

> **
>
>
> Thanks for this.
>
> Do I litterally just use the words source-string? I was planning on
> running this on-mass so the descriptions will be all be slightly different.
>
>
> --- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
> >
> > REPLACE ( source-string , from-string , to-string )
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *checkout my new blog <http://www.usdoingstuff.com> *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
>
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez> <
> http://www.facebook.com/josegomez>
> > <http://www.google.com/profiles/jose.gomez> <
> http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> >
> > On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@... <
> > michael.hutcheson@...> wrote:
> >
> > > **
> > >
> > >
> > > Hey folks,
> > >
> > > Is it possible to perform a find and replace BPM? What I want to
> achive is
> > > only replace specific words in the parts descriptions, and leave the
> rest
> > > of the description intact.
> > >
> > > I was thinking of using a BPM with 4GL code:
> > >
> > > for each Part where ( Part.PartDescription MATCHES '*SWLR*')no-lock:
> > > Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> > > 'PartDescription','Swivel- Long radius').
> > >
> > > However, this will overright the entire description, I only want to
> > > replace 'SWLR' with 'Swivel- Long radius' - any ideas?
> > >
> > > Regards,
> > >
> > > Michael
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking
*
*:: 904.962.2887*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]
source-string
Specifies the base string to make replacements in. The source-string
parameter can be
any expression that evaluates to a string or a LONGCHAR. The REPLACE
function does
not change the value of source-string itself; the function returns the
string with
replacements.

from-string
Specifies the substring to replace. The from-string parameter can be any
expression that
evaluates to a string or a LONGCHAR. Each occurrence of from-string within
source-string is replaced.

to-string
Specifies the replacement substring. The to-string parameter can be any
expression that
evaluates to a string or a LONGCHAR. Each occurrence of from-string in
source-string is replaced by to-string.

The following example uses the REPLACE function to replace the string
�user� with an actual
user ID, if available:

DEFINE VARIABLE greeting AS CHARACTER NO-UNDO FORMAT "x(40)"
INITIAL "Starting user�s session . . . ".
IF USERID("DICTDB") < > "" THEN
greeting = REPLACE(greeting, "user", USERID("DICTDB")).
DISPLAY greeting WITH NO-LABELS.

The REPLACE function replaces all occurrences of from-string within
source-string.
After replacing a substring, the REPLACE function resumes searching the
string after the
inserted text. Thus, the inserted text is not recursively searched (in
whole or in part) for
from-string.

The search for occurrences of from-string within source-string is not case
sensitive,
unless one of the three values used in the function (source-string,
to-string, or
from-string) is a case-sensitive field or variable.

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Fri, Feb 3, 2012 at 8:39 AM, John Driggers <waffqle@...> wrote:

> Naw captain.
> REPLACE ( source-string , from-string , to-string ).
>
> All three of those arguments need to be replaced with the actual data.
> Stick it in the middle of your loop and you should be ok.
>
>
> On Fri, Feb 3, 2012 at 8:34 AM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> > **
> >
> >
> > Thanks for this.
> >
> > Do I litterally just use the words source-string? I was planning on
> > running this on-mass so the descriptions will be all be slightly
> different.
> >
> >
> > --- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
> > >
> > > REPLACE ( source-string , from-string , to-string )
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@...
> >
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez> <
> > http://www.facebook.com/josegomez>
> > > <http://www.google.com/profiles/jose.gomez> <
> > http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > >
> > > On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@... <
> > > michael.hutcheson@...> wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Hey folks,
> > > >
> > > > Is it possible to perform a find and replace BPM? What I want to
> > achive is
> > > > only replace specific words in the parts descriptions, and leave the
> > rest
> > > > of the description intact.
> > > >
> > > > I was thinking of using a BPM with 4GL code:
> > > >
> > > > for each Part where ( Part.PartDescription MATCHES '*SWLR*')no-lock:
> > > > Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> > > > 'PartDescription','Swivel- Long radius').
> > > >
> > > > However, this will overright the entire description, I only want to
> > > > replace 'SWLR' with 'Swivel- Long radius' - any ideas?
> > > >
> > > > Regards,
> > > >
> > > > Michael
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking
> *
> *:: 904.962.2887*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
>
>


[Non-text portions of this message have been removed]
We have part descriptions that are like the following:

SWLR blah blah blah

blah blah SWLR blah blah

blah blah SWLR

Would this still ensure I keep all the blah blah's?

How do I incorporate this into my code?

Thanks again.

--- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>
> Naw captain.
> REPLACE ( source-string , from-string , to-string ).
>
> All three of those arguments need to be replaced with the actual data.
> Stick it in the middle of your loop and you should be ok.
>
>
> On Fri, Feb 3, 2012 at 8:34 AM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> > **
> >
> >
> > Thanks for this.
> >
> > Do I litterally just use the words source-string? I was planning on
> > running this on-mass so the descriptions will be all be slightly different.
> >
> >
> > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > >
> > > REPLACE ( source-string , from-string , to-string )
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@
> >
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez> <
> > http://www.facebook.com/josegomez>
> > > <http://www.google.com/profiles/jose.gomez> <
> > http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > >
> > > On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@ <
> > > michael.hutcheson@> wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Hey folks,
> > > >
> > > > Is it possible to perform a find and replace BPM? What I want to
> > achive is
> > > > only replace specific words in the parts descriptions, and leave the
> > rest
> > > > of the description intact.
> > > >
> > > > I was thinking of using a BPM with 4GL code:
> > > >
> > > > for each Part where ( Part.PartDescription MATCHES '*SWLR*')no-lock:
> > > > Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> > > > 'PartDescription','Swivel- Long radius').
> > > >
> > > > However, this will overright the entire description, I only want to
> > > > replace 'SWLR' with 'Swivel- Long radius' - any ideas?
> > > >
> > > > Regards,
> > > >
> > > > Michael
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking
> *
> *:: 904.962.2887*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
> [Non-text portions of this message have been removed]
>
No offense man, but the info I gave you is the best i've got, lets try again

If you have the string

" *A person's a person, no matter how small.* "
And you run

Replace ("*A person's a person, no matter how small.* "," * person's a
person* ","elephant is loopy")

You'll get A elephant is loopy, no matter how small...


you can put it in a loop as such

FOR EACH Part:
Assign Part.PartDesc = REPLACE(Part.PartDesc, "STUFF I DONT LIKE","THING I
LOVE")
END.

Hope this helps!

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Fri, Feb 3, 2012 at 8:47 AM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

> **
>
>
> We have part descriptions that are like the following:
>
> SWLR blah blah blah
>
> blah blah SWLR blah blah
>
> blah blah SWLR
>
> Would this still ensure I keep all the blah blah's?
>
> How do I incorporate this into my code?
>
> Thanks again.
>
>
> --- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
> >
> > Naw captain.
> > REPLACE ( source-string , from-string , to-string ).
> >
> > All three of those arguments need to be replaced with the actual data.
> > Stick it in the middle of your loop and you should be ok.
> >
> >
> > On Fri, Feb 3, 2012 at 8:34 AM, michael.hutcheson@... <
> > michael.hutcheson@...> wrote:
> >
> > > **
> > >
> > >
> > > Thanks for this.
> > >
> > > Do I litterally just use the words source-string? I was planning on
> > > running this on-mass so the descriptions will be all be slightly
> different.
> > >
> > >
> > > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > > >
> > > > REPLACE ( source-string , from-string , to-string )
> > > >
> > > > *Jose C Gomez*
> > > > *Software Engineer*
> > > > *
> > > > *
> > > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > > *
> > > > *T: 904.469.1524 mobile
> > > > E: jose@
> > >
> > > > http://www.josecgomez.com
> > > > <http://www.linkedin.com/in/josecgomez> <
> > > http://www.facebook.com/josegomez>
> > > > <http://www.google.com/profiles/jose.gomez> <
> > > http://www.twitter.com/joc85>
> > > > <http://www.josecgomez.com/professional-resume/>
> > > > <http://www.josecgomez.com/feed/>
> > > > <http://www.usdoingstuff.com>
> > > >
> > > > *Quis custodiet ipsos custodes?*
> > > >
> > > >
> > > >
> > > > On Fri, Feb 3, 2012 at 8:16 AM, michael.hutcheson@ <
> > > > michael.hutcheson@> wrote:
> > > >
> > > > > **
> > > > >
> > > > >
> > > > > Hey folks,
> > > > >
> > > > > Is it possible to perform a find and replace BPM? What I want to
> > > achive is
> > > > > only replace specific words in the parts descriptions, and leave
> the
> > > rest
> > > > > of the description intact.
> > > > >
> > > > > I was thinking of using a BPM with 4GL code:
> > > > >
> > > > > for each Part where ( Part.PartDescription MATCHES
> '*SWLR*')no-lock:
> > > > > Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE,
> > > > > 'PartDescription','Swivel- Long radius').
> > > > >
> > > > > However, this will overright the entire description, I only want to
> > > > > replace 'SWLR' with 'Swivel- Long radius' - any ideas?
> > > > >
> > > > > Regards,
> > > > >
> > > > > Michael
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking
> > *
> > *:: 904.962.2887*
> > *:: waffqle@...*
>
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]