Crysta syntax for carriage return?

awesome, thanks Gerry, I'll have a play.

--- In vantage@yahoogroups.com, "Gerry Loranger" <gloranger@...> wrote:
>
> Here's a couple of functions that check the part description for a carriage
> return and return only the first line in a msgbox:
>
>
>
> lib\PublishInfoMsg.i &InfoMsg =
> "substring(ttPart.PartDescription,1,index(ttPart.PartDescription,Chr(13),1))
> "}.
>
>
>
> Gerry
>
>
>
>
>
>
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> Kerry_Muntz
> Sent: Wednesday, October 14, 2009 3:00 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Crysta syntax for carriage return?
>
>
>
>
>
> Kinda the same subject: Does anyone know how a carriage return can be
> detected? eg in a method directive (BPM)? Part descriptions are
> occassionally made with a carriage return - which stuffs up some
> import/export stuff for us. I'd ideally like to shut the carriage return
> down for the description field.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Gerry
> Loranger" <gloranger@> wrote:
> >
> > The following prints "a" on one line and "b" on the next:
> >
> >
> >
> > "a" & chr(13) & "b"
> >
> >
> >
> >
> >
> >
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
> Behalf Of
> > advantage@
> > Sent: Wednesday, October 14, 2009 1:40 PM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Crysta syntax for carriage return?
> >
> >
> >
> >
> >
> > Brain fade here. What is the crystal syntax for carriage return Chr13?
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Here are the functions' details:



Gerry





SUBSTRING function

Extracts a portion of a character string from a field or variable.



Syntax SUBSTRING (source , position [ , length [ , type ] ] )



source

A CHARACTER or LONGCHAR expression from which you want to extract characters

or bytes.

position

An INTEGER expression that indicates the position of the first character you
want to

extract from source.

length

An INTEGER expression that indicates the number of characters you want to
extract from

source. If you do not use the length argument or specify -1 as the length,
SUBSTRING

uses the remainder of the string from the specified position.

type

A CHARACTER expression that directs Progress to interpret the specified
position and

length values as character units, bytes, or columns. A double-byte character
registers as

one character unit. By default, Progress interprets the specified position
and length

values as character units.





INDEX function

Returns an integer that indicates the position of the target string within
the source string.



Syntax INDEX ( source , target [ , starting ] )



source

A CHARACTER or LONGCHAR expression.

target

A CHARACTER or LONGCHAR expression whose position you want to locate in

source. If target does not exist within source, INDEX returns a 0.

starting

An integer that specifies at which left-most position in the string to start
the search. For

example, INDEX("abcdefabcdef","abc",6) returns 7.











From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Kerry_Muntz
Sent: Wednesday, October 14, 2009 4:09 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Crysta syntax for carriage return?





awesome, thanks Gerry, I'll have a play.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Gerry
Loranger" <gloranger@...> wrote:
>
> Here's a couple of functions that check the part description for a
carriage
> return and return only the first line in a msgbox:
>
>
>
> lib\PublishInfoMsg.i &InfoMsg =
>
"substring(ttPart.PartDescription,1,index(ttPart.PartDescription,Chr(13),1))
> "}.
>
>
>
> Gerry
>
>
>
>
>
>
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of
> Kerry_Muntz
> Sent: Wednesday, October 14, 2009 3:00 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Crysta syntax for carriage return?
>
>
>
>
>
> Kinda the same subject: Does anyone know how a carriage return can be
> detected? eg in a method directive (BPM)? Part descriptions are
> occassionally made with a carriage return - which stuffs up some
> import/export stuff for us. I'd ideally like to shut the carriage return
> down for the description field.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> , "Gerry
> Loranger" <gloranger@> wrote:
> >
> > The following prints "a" on one line and "b" on the next:
> >
> >
> >
> > "a" & chr(13) & "b"
> >
> >
> >
> >
> >
> >
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
> Behalf Of
> > advantage@
> > Sent: Wednesday, October 14, 2009 1:40 PM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Crysta syntax for carriage return?
> >
> >
> >
> >
> >
> > Brain fade here. What is the crystal syntax for carriage return Chr13?
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
I can use this, thanks!



Gerry



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Kerry_Muntz
Sent: Wednesday, October 14, 2009 4:07 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Crysta syntax for carriage return?





That sounds like a good work-around Steven - ta kindly.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , Steven
Gotschall <sgotschall@...> wrote:
>
> What I do for BAQs that display descriptions is to create a calculated
field like this:
>
> replace(replace(HDCase.ResolutionText, chr(13), " // "), chr(10), " // ")
> I do this because if you try and copy and paste with the carriage returns
in the text, it messes up Excel. Since this is 4GL it should work in a BPM.
>
>
>
> ________________________________
> From: Kerry_Muntz <kerry_muntz@...>
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Wed, October 14, 2009 2:59:56 PM
> Subject: [Vantage] Re: Crysta syntax for carriage return?
>
>
> Kinda the same subject: Does anyone know how a carriage return can be
detected? eg in a method directive (BPM)? Part descriptions are
occassionally made with a carriage return - which stuffs up some
import/export stuff for us. I'd ideally like to shut the carriage return
down for the description field.
>
> --- In vantage@yahoogroups .com, "Gerry Loranger" <gloranger@ ..> wrote:
> >
> > The following prints "a" on one line and "b" on the next:
> >
> >
> >
> > "a" & chr(13) & "b"
> >
> >
> >
> >
> >
> >
> >
> > From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On
Behalf Of
> > advantage@ .
> > Sent: Wednesday, October 14, 2009 1:40 PM
> > To: vantage@yahoogroups .com
> > Subject: [Vantage] Crysta syntax for carriage return?
> >
> >
> >
> >
> >
> > Brain fade here. What is the crystal syntax for carriage return Chr13?
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
If the sales order will be pulled from stock:

* Why would you want the sales order on the traveler?

* How would you know which Job the sales order was for?

A Make To Stock is simply that. The production floor needs no other
information than that. Otherwise you would have to list every open order
for that part on the job traveler.



Charlie Smith

Smith Business Services / 2W Technologies LLC

www.vistaconsultant.com <http://www.vistaconsultant.com/> /
www.2WTech.com









From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of advantage@...
Sent: Wednesday, October 14, 2009 10:01 AM
To: vantage@yahoogroups.com
Subject: [Vantage] MRP Job Traveler with Sales Order





When MRP creates a Make to Stock Job for a Sales Order Demand; how can I
get
that Sales Order on the Job Traveler since it is not Make to Order and
isn't
in the JobProd table?

We do not want to go Make to Order because we want to be able to ship
from
stock.

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





[Non-text portions of this message have been removed]
Steve, I had a similar issue with HD Case except mine is the Description and Full Description (which are the same fields) The first line is max 60 characters and the second part of the full description seems almost unlimited (I have some descriptions where users write a book in there)
Â
Do you know how I can get the first and second part of the HD Case description so it does not wrap when brought into excel?

--- On Wed, 10/14/09, Steven Gotschall <sgotschall@...> wrote:


From: Steven Gotschall <sgotschall@...>
Subject: Re: [Vantage] Re: Crysta syntax for carriage return?
To: vantage@yahoogroups.com
Date: Wednesday, October 14, 2009, 3:09 PM


Â



What I do for BAQs that display descriptions is to create a calculated field like this:

replace(replace( HDCase.Resolutio nText, chr(13), " // "), chr(10), " // ")
I do this because if you try and copy and paste with the carriage returns in the text, it messes up Excel. Since this is 4GL it should work in a BPM.

____________ _________ _________ __
From: Kerry_Muntz <kerry_muntz@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Wed, October 14, 2009 2:59:56 PM
Subject: [Vantage] Re: Crysta syntax for carriage return?

Â
Kinda the same subject: Does anyone know how a carriage return can be detected? eg in a method directive (BPM)? Part descriptions are occassionally made with a carriage return - which stuffs up some import/export stuff for us. I'd ideally like to shut the carriage return down for the description field.

--- In vantage@yahoogroups .com, "Gerry Loranger" <gloranger@. ..> wrote:
>
> The following prints "a" on one line and "b" on the next:
>
>
>
> "a" & chr(13) & "b"
>
>
>
>
>
>
>
> From: vantage@yahoogroups .com [mailto:vantage@ yahoogroups .com] On Behalf Of
> advantage@.. .
> Sent: Wednesday, October 14, 2009 1:40 PM
> To: vantage@yahoogroups .com
> Subject: [Vantage] Crysta syntax for carriage return?
>
>
>
>
>
> Brain fade here. What is the crystal syntax for carriage return Chr13?
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

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



















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

replace(replace(HDCase.Description, chr(13), " // "), chr(10), " // ")
If you want to limit the length to lets say 200 characters, then it would be:

Substring(replace(replace(HDCase.Description, chr(13), " // "), chr(10), " // "), 1, 200)

In Excel, you can format the cell or column to either wrap the text or not wrap it.



________________________________
From: Mark Wagner <mjfw2003@...>
To: vantage@yahoogroups.com
Sent: Thu, October 15, 2009 8:01:18 AM
Subject: Re: [Vantage] Re: Crysta syntax for carriage return?

Â
Steve, I had a similar issue with HD Case except mine is the Description and Full Description (which are the same fields) The first line is max 60 characters and the second part of the full description seems almost unlimited (I have some descriptions where users write a book in there)
Â
Do you know how I can get the first and second part of the HD Case description so it does not wrap when brought into excel?

--- On Wed, 10/14/09, Steven Gotschall <sgotschall@yahoo. com> wrote:

From: Steven Gotschall <sgotschall@yahoo. com>
Subject: Re: [Vantage] Re: Crysta syntax for carriage return?
To: vantage@yahoogroups .com
Date: Wednesday, October 14, 2009, 3:09 PM

Â

What I do for BAQs that display descriptions is to create a calculated field like this:

replace(replace( HDCase.Resolutio nText, chr(13), " // "), chr(10), " // ")
I do this because if you try and copy and paste with the carriage returns in the text, it messes up Excel. Since this is 4GL it should work in a BPM.

____________ _________ _________ __
From: Kerry_Muntz <kerry_muntz@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Wed, October 14, 2009 2:59:56 PM
Subject: [Vantage] Re: Crysta syntax for carriage return?

Â
Kinda the same subject: Does anyone know how a carriage return can be detected? eg in a method directive (BPM)? Part descriptions are occassionally made with a carriage return - which stuffs up some import/export stuff for us. I'd ideally like to shut the carriage return down for the description field.

--- In vantage@yahoogroups .com, "Gerry Loranger" <gloranger@. ..> wrote:
>
> The following prints "a" on one line and "b" on the next:
>
>
>
> "a" & chr(13) & "b"
>
>
>
>
>
>
>
> From: vantage@yahoogroups .com [mailto:vantage@ yahoogroups .com] On Behalf Of
> advantage@.. .
> Sent: Wednesday, October 14, 2009 1:40 PM
> To: vantage@yahoogroups .com
> Subject: [Vantage] Crysta syntax for carriage return?
>
>
>
>
>
> Brain fade here. What is the crystal syntax for carriage return Chr13?
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

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

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







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