Bob,

You need to use the WHEN connective in your LIST statement.

WITH connectives (LIST file WITH expression) will select any record in which
ANY value matches the criteria and return the entire set of values. This
makes sense for most cases, e.g. I want to match an address without knowing
which line of the address holds the town I'm looking for, or I want any
orders that include a particular item.

WHEN performs the same selection (LIST file WHEN expression), but then
filters out the non-matching values from the display set. This only works,
of course, if it knows which of the columns to filter: for that you need to
make sure you have an association correctly defined for those columns. (It
is quite legitimate to have more than one association in a listing, e.g.
order lines and payment schedule).

Just in case you're not sure how to do that:

1. Create a phrase in the dictionary containing the name of each field in
the association:

1>PH
2>field field field

2. Put the name of the association on line 7 of each D/I or V type
dictionary in the association.


Brian

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Bob Woodward
> Sent: 10 August 2005 00:09
> To: U2-Users List
> Subject: [U2] Limiting MV's in a list statement
> 
> Hi folks.
> 
> 
> 
> I'm trying to do a listing of a file that has a number of 
> attributes that are MV'ed and are associated, at least 
> logically, and I'm wanting to only display specific values.  
> Here's the command and layout for a single item:
> 
> 
> 
> LIST PM ITEM.ID STATUS.FLAG CUBES TOTE.ITEM UOM
> 
> 
> 
> PM file
> 
>       Item.ID, Status.Flag, cubes, Tote.Item, UnitOfMeasure
> 
> 
> 
>       1234        3        0.2403     Y            EA
> 
>                   4         0.0000     Y            SP
> 
>                   4         1.2044                  CS
> 
>                   4         4.8934                  MP
> 
> 
> 
> What I'm wanting to get is this:
> 
> 
> 
> PM file
> 
>       Item.ID, Status.Flag, cubes, Tote.Item, UnitOfMeasure
> 
> 
> 
>       1234        3         0.2403     Y            EA
> 
>                   4         0.0000     Y            SP
> 
> 
> 
> I hope the formatting came out right for that.  I used 
> courier font for the spacing.  Anyway, I'm wanting to select 
> based on the TOTE.ITEM field with the selected value lines 
> staying together.  I think that means I need to first sort by 
> the ITEM.ID then BY.EXP TOTE.ITEM but then how do I limit the 
> display to just those value lines that have the "Y" in TOTE.ITEM?
> 
> 
> 
> I'm sure I've done something similar to this long, long ago.  
> I'm hoping to avoid writing a program because this is going 
> to be a one or two use listing but I'm getting to the point 
> that that may be faster.
> 
> 
> 
> TIA for any and all help offered.
> 
> 
> 
> Bob W
> 
> Harbor Wholesale Grocery
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to