Hi Karl, Not sure about standard subr's, but if you wanted to write your own SUBR it is do-able. It's really not all that hard. In U2 the syntax is:
On the Dict item in attr 2 you have: SUBR("SUB.PROGRAM.NAME", Dict_Item_Name1, Dict_Item_Name2, ......, Dict_Item_Name999) and in the SUBR header you have: SUBROUTINE SUB.PROGRAM.NAME (VALUE.TO.RETURN, Dict_Item_Name1, Dict_Item_Name2, ......, Dict_Item_Name999) [do you dcount off of one of the dict names you passed] [set up your loop] [stuff data into VALUE.TO.RETURN] RETURN I don't even used the standard CATS and SPLICES and stuff 'cause by the time I figure it out, I could have already written three custom subrs........the odd thing is that the param list differs from any other subroutines as in the dict you put the program name to call in the first position, and in the actual subroutine in the first position, you put the datum to return. hth! Allen E. Elwood Senior Programmer Analyst Direct (818) 361-5251 Fax (818) 361-5251 Cell (818) 359-8162 Home (818) 361-7217 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Karl L Pearson Sent: Tuesday, September 21, 2004 13:44 To: u2-users Subject: Re: [U2] [UD] - I-Desc IF, THEN, ELSE or SUBR -IFS Okay then... That works for me, too, but in my case, I just get the LAST, or highest numbered item. That's because our F6 only contains n+1 for line items on an invoice. Is there syntax in an I-Desc that would equal: FOR X = F6 to 1 step -1 ??? Thanks, Karl On Tue, 2004-09-21 at 14:17, Hruby, Paul wrote: > Thanks Bryan, Glenn, Ian and others. > > I had since come up with the same conclusion using the following which seems > to work well: > > SUBR("-IFS",KEYTWO NE "",SUBR("-CATS",REUSE(@ID:"*"),KEYTWO),"") > > It may be an over kill, but it does the job. After I sent off the help > request, I had tried a few things with REUSE() that didn't work well until I > used -CATS also (duh!). > > Oh well, it's nice to have such a great resource available like the members > at u2-users. > > Again, thanks to all who have helped. Receiving the list via digest mode it > hard to see replies right away. > > Paul > > ------------------------------ > > Date: Tue, 21 Sep 2004 14:25:53 -0400 > From: Glenn Herbert <[EMAIL PROTECTED]> > Subject: Re: [U2] [UD] - I-Desc IF, THEN, ELSE or SUBR -IFS > > Field 2 should be: > > CATS(REUSE(@ID),CATS(REUSE("*"),FILETWO)) > > > > Try > > SUBR("-CATS",REUSE(@ID:"*"),KEYTWO) > > Since the ID is not multivalued, you have to provide a hint to say you want > to repeat it for each multivalue. > > Hth, > Ian > ------- > u2-users mailing list > [EMAIL PROTECTED] > To unsubscribe please visit http://listserver.u2ug.org/ -- Karl L. Pearson Director of IT, ATS Industrial Supply Direct: 801-978-4429 Toll-free: 888-972-3182 x29 Fax: 801-972-3888 http://www.atsindustrial.com [EMAIL PROTECTED] ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/