I personally would even write it like this if I am sure the number of values is no more then ten: FOR I=1 TO DCOUNT(REC<15>,@VM)
(and of course I would not use number as a field position) ----- Original Message ----- From: "Mark Johnson" <[EMAIL PROTECTED]> To: <u2-users@listserver.u2ug.org> Sent: Thursday, January 05, 2006 5:21 AM Subject: [U2] DCOUNT > I'm finding that I'm doing a lot of programming for the processing through > multi-valued attributes. > > I'm wondering if the method I'm using is the best way to determine the last > element. > > LAST=DCOUNT(REC<15>,@VM) > FOR I=1 TO LAST > (process something) > NEXT I > > There was a REMOVE thread a few months ago and I use that when I expect that > the number of elements could test the patience of the EXTRACTs. REMOVE doesn't > give you the MV counter for the associated fields by itself. You have to > manage separately and hope to keep in sync. That's more code. > > I know that in VB certain object array variables (a list box for example) has > a property for the number of elements. Is there anything in MV that I'm not > aware of for determining the last multi-value that's easier to type than the > DCOUNT expression. I'm looking at reducing my keystrokes. > > Thanks in advance. > Mark Johnson > ------- > 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/