Tilde (~) and queries in 4GL for BPM

Hello,


If there is a Tilde, this is the "standard" list separator.
You can do the following:

If you are wanting to see this in a BAQ (Business Activity Query) / Dashboard, you can use the following calculated field(s):

<FieldName> : Formula to use

<CalcField1>: IF ( Num-entries(<TABLE>.<FIELD>,"~~")>=1) then (Entry(1,(<TABLE>.<FIELD>,"~~")) else ""

<CalcField2>: IF ( Num-entries(<TABLE>.<FIELD>,"~~")>=2) then (Entry(2,(<TABLE>.<FIELD>,"~~")) else ""

...

where <TABLE>.<FIELD> is the required table and field name you of the list you wish to separate.

The separator is always a tilde "~" and you need to use the double tilde for the Num-entries function.

Notice that the only part that changes is the number in the IF and ENTRY statements.

Repeat up to the maximum number of list items that you want to have displayed.

Note: the type should be Character.

Here is an example using the Order Header Sales Rep List (OrderHed.SalesRepList)

<FieldName> : <Code>

SalesRep1: IF ( Num-entries(OrderHed.SalesRepList,"~~")>=1) then (Entry(1,OrderHed.SalesRepList,"~~")) else ""

SalesRep2: IF ( Num-entries(OrderHed.SalesRepList,"~~")>=2) then (Entry(2,OrderHed.SalesRepList,"~~")) else ""

SalesRep3: IF ( Num-entries(OrderHed.SalesRepList,"~~")>=3) then (Entry(3,OrderHed.SalesRepList,"~~")) else ""

...




--- In vantage@yahoogroups.com, "Keith" <keithfwalter@...> wrote:
>
> Waffqle, Kevin, Carl, thanks for the help. I am gonna try your sugestions - will post back what i find that works!
>
> -Keith
>
> --- In vantage@yahoogroups.com, "Carl Peterson" <cpeterson@> wrote:
> >
> >
> > Keith:
> >
> > I have found that finding a "~" in a field can be difficult.
> >
> > The ASCII value of a ~ is 126 and I usually check all characters in a field
> > to find a ~.
> >
> > This is not your file but I use the following code to find a ~ in a
> > salesreplist for parsing out reps ids for reports by salesreps by ordernum.
> >
> > Sample code.
> >
> > DEF VAR i AS INTE no-undo.
> > FOR EACH ttorderhed where ttorderhed.rowmod = "a" or ttorderhed.rowmod =
> > "u".
> > DO i = 1 TO LENGTH(ttorderhed.salesreplist).
> > IF asc(SUBSTRING(ttorderhed.salesreplist,i,1)) = 126 THEN
> > DO:
> >
> > Insert your BPM code in this area, Keith.
> >
> > END.
> > END.
> > END. /* for each */
> >
> > I hope this will help you, Keith.
> >
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > Keith Walter
> > Sent: Friday, March 11, 2011 4:02 PM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Tilde (~) and queries in 4GL for BPM
> >
> >
> > Hi Gang!
> >
> > I am trying to setup a BPM with a conditional query (number of rows in the
> > "designed" query blah blah blah). I am using the ARInvoice.GetShipments
> > method,
> > which has a "packingslip" parameter. The parameter vaule is tilde (~)
> > delimited. Like this: 2345~2346~2347 etc.
> >
> > I want to write a query statement using these values in the "where" clause,
> > one
> > at a time. Is it possible to break out each of these values within a query?
> >
> > Thanks for any ideas!
> >
> >
> > Keith Walter
> > ERP Business Systems Analyst
> > Norgren Automation Solutions, Saline Division
> > keith.walter@ <mailto:keith.walter%40norgrenauto.com>
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
Hi Gang!Â

I am trying to setup a BPM with a conditional query (number of rows in the
"designed" query blah blah blah). I am using the ARInvoice.GetShipments method,
which has a "packingslip" parameter. The parameter vaule is tilde (~)
delimited. Like this: 2345~2346~2347 etc.

I want to write a query statement using these values in the "where" clause, one
at a time. Is it possible to break out each of these values within a query?

Thanks for any ideas!

Â
Keith Walter
ERP Business Systems Analyst
Norgren Automation Solutions, Saline Division
keith.walter@...




[Non-text portions of this message have been removed]
Don't we all love the way they do that crap with the tildes =)
Try
FOR EACH thing WHERE thing.field MATCHES ("*stuff*").

"MATCHES" will scan the field, the asterisks will make it ignore the
surrounding data.

On Fri, Mar 11, 2011 at 4:02 PM, Keith Walter <keithfwalter@...>wrote:

>
>
> Hi Gang!
>
> I am trying to setup a BPM with a conditional query (number of rows in the
> "designed" query blah blah blah). I am using the ARInvoice.GetShipments
> method,
> which has a "packingslip" parameter. The parameter vaule is tilde (~)
> delimited. Like this: 2345~2346~2347 etc.
>
> I want to write a query statement using these values in the "where" clause,
> one
> at a time. Is it possible to break out each of these values within a
> query?
>
> Thanks for any ideas!
>
>
> Keith Walter
> ERP Business Systems Analyst
> Norgren Automation Solutions, Saline Division
> keith.walter@...
>
> [Non-text portions of this message have been removed]
>
>
>


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



I think you're going to need to go the 4GL route.



Kevin Simon



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Keith Walter
Sent: Friday, March 11, 2011 4:02 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Tilde (~) and queries in 4GL for BPM





Hi Gang!

I am trying to setup a BPM with a conditional query (number of rows in the
"designed" query blah blah blah). I am using the ARInvoice.GetShipments
method,
which has a "packingslip" parameter. The parameter vaule is tilde (~)
delimited. Like this: 2345~2346~2347 etc.

I want to write a query statement using these values in the "where" clause,
one
at a time. Is it possible to break out each of these values within a query?

Thanks for any ideas!


Keith Walter
ERP Business Systems Analyst
Norgren Automation Solutions, Saline Division
keith.walter@... <mailto:keith.walter%40norgrenauto.com>

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





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

I have found that finding a "~" in a field can be difficult.

The ASCII value of a ~ is 126 and I usually check all characters in a field
to find a ~.

This is not your file but I use the following code to find a ~ in a
salesreplist for parsing out reps ids for reports by salesreps by ordernum.

Sample code.

DEF VAR i AS INTE no-undo.
FOR EACH ttorderhed where ttorderhed.rowmod = "a" or ttorderhed.rowmod =
"u".
DO i = 1 TO LENGTH(ttorderhed.salesreplist).
IF asc(SUBSTRING(ttorderhed.salesreplist,i,1)) = 126 THEN
DO:

Insert your BPM code in this area, Keith.

END.
END.
END. /* for each */

I hope this will help you, Keith.

Carl Peterson
1-734-812-9532
Nexus Software, Inc..



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Keith Walter
Sent: Friday, March 11, 2011 4:02 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Tilde (~) and queries in 4GL for BPM


Hi Gang!

I am trying to setup a BPM with a conditional query (number of rows in the
"designed" query blah blah blah). I am using the ARInvoice.GetShipments
method,
which has a "packingslip" parameter. The parameter vaule is tilde (~)
delimited. Like this: 2345~2346~2347 etc.

I want to write a query statement using these values in the "where" clause,
one
at a time. Is it possible to break out each of these values within a query?

Thanks for any ideas!


Keith Walter
ERP Business Systems Analyst
Norgren Automation Solutions, Saline Division
keith.walter@... <mailto:keith.walter%40norgrenauto.com>

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



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

I have found that finding a "~" in a field can be difficult.

The ASCII value of a ~ is 126 and I usually check all characters in a field
to find a ~.

This is not your file but I use the following code to find a ~ in a
salesreplist for parsing out reps ids for reports by salesreps by ordernum.

Sample code.

DEF VAR i AS INTE no-undo.
FOR EACH ttorderhed where ttorderhed.rowmod = "a" or ttorderhed.rowmod =
"u".
DO i = 1 TO LENGTH(ttorderhed.salesreplist).
IF asc(SUBSTRING(ttorderhed.salesreplist,i,1)) = 126 THEN
DO:

Insert your BPM code in this area, Keith.

END.
END.
END. /* for each */

I hope this will help you, Keith.




From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Keith Walter
Sent: Friday, March 11, 2011 4:02 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Tilde (~) and queries in 4GL for BPM


Hi Gang!

I am trying to setup a BPM with a conditional query (number of rows in the
"designed" query blah blah blah). I am using the ARInvoice.GetShipments
method,
which has a "packingslip" parameter. The parameter vaule is tilde (~)
delimited. Like this: 2345~2346~2347 etc.

I want to write a query statement using these values in the "where" clause,
one
at a time. Is it possible to break out each of these values within a query?

Thanks for any ideas!


Keith Walter
ERP Business Systems Analyst
Norgren Automation Solutions, Saline Division
keith.walter@... <mailto:keith.walter%40norgrenauto.com>

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



[Non-text portions of this message have been removed]
Waffqle, Kevin, Carl, thanks for the help. I am gonna try your sugestions - will post back what i find that works!

-Keith

--- In vantage@yahoogroups.com, "Carl Peterson" <cpeterson@...> wrote:
>
>
> Keith:
>
> I have found that finding a "~" in a field can be difficult.
>
> The ASCII value of a ~ is 126 and I usually check all characters in a field
> to find a ~.
>
> This is not your file but I use the following code to find a ~ in a
> salesreplist for parsing out reps ids for reports by salesreps by ordernum.
>
> Sample code.
>
> DEF VAR i AS INTE no-undo.
> FOR EACH ttorderhed where ttorderhed.rowmod = "a" or ttorderhed.rowmod =
> "u".
> DO i = 1 TO LENGTH(ttorderhed.salesreplist).
> IF asc(SUBSTRING(ttorderhed.salesreplist,i,1)) = 126 THEN
> DO:
>
> Insert your BPM code in this area, Keith.
>
> END.
> END.
> END. /* for each */
>
> I hope this will help you, Keith.
>
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> Keith Walter
> Sent: Friday, March 11, 2011 4:02 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Tilde (~) and queries in 4GL for BPM
>
>
> Hi Gang!
>
> I am trying to setup a BPM with a conditional query (number of rows in the
> "designed" query blah blah blah). I am using the ARInvoice.GetShipments
> method,
> which has a "packingslip" parameter. The parameter vaule is tilde (~)
> delimited. Like this: 2345~2346~2347 etc.
>
> I want to write a query statement using these values in the "where" clause,
> one
> at a time. Is it possible to break out each of these values within a query?
>
> Thanks for any ideas!
>
>
> Keith Walter
> ERP Business Systems Analyst
> Norgren Automation Solutions, Saline Division
> keith.walter@... <mailto:keith.walter%40norgrenauto.com>
>
> [Non-text portions of this message have been removed]
>
>
>
> [Non-text portions of this message have been removed]
>