You can use the accumulate function to count records. Try this:
DEFINE VARIABLE X AS INTEGER NO-UNDO.
FOR EACH PORel WHERE <Criteria>:
ACCUMULATE PORel.PORelNum (COUNT).
END.
X = (ACCUM COUNT POrel.PORelNum).
*John Driggers*
**
*Chief Data Wrangler*
*
*
*I have an Epicor blog <http://usdoingstuff.com/>. How useful is that?*
*
*:: 904.404.9233
:: waffqle@...
:: http://www.usdoingstuff.com <http://www.usdoingstuff.com/>
*
*
DEFINE VARIABLE X AS INTEGER NO-UNDO.
FOR EACH PORel WHERE <Criteria>:
ACCUMULATE PORel.PORelNum (COUNT).
END.
X = (ACCUM COUNT POrel.PORelNum).
*John Driggers*
**
*Chief Data Wrangler*
*
*
*I have an Epicor blog <http://usdoingstuff.com/>. How useful is that?*
*
*:: 904.404.9233
:: waffqle@...
:: http://www.usdoingstuff.com <http://www.usdoingstuff.com/>
*
*
On Thu, Jul 5, 2012 at 6:23 PM, supertico05 <mvissuet@...>wrote:
> **
>
>
> I am trying to write ABL code where it finds all porel where
> porel equals a specific job.
>
> after it finds each porel, I want to find the how many po releases exist
> in that line. How would you do that?
>
> so far I have:
>
> for each porel no-lock where
> porel.company = cur-comp and
> porel.openrelease = true and
> porel.jobnum = ipJobNum:
>
> let's say it finds PO 12344 Line 1 release one,
> then depending on the number of realeses on that PO i want to do a
> specific action.
>
>
>
[Non-text portions of this message have been removed]