Yes, it's a while loop within the eep.

This is the code I'm using.  The idea is very simple, and it would be a
erally simple thing, I think to use staff instead of clients here.  If you
use Staff names insted of ID numbers, it might even be easier, because you
don't have to look them up.

====================================================
IF .vNew_Group = 'Y' THEN

set var vNew_group='N'

*(show var)

choose client_str from #values for tot_name from maininfo +
 where clientid in (select clientid from regist where +
 fundsrce=.vfunsrce and servcode = .vREG_CODE) +
 order by tot_name chkbox

*(show var)

set var client_txt=(ssub(.client_str,1)) 

*(show var)

while client_txt is not null then
       set var client_id=clientid from maininfo where tot_name=.client_txt

*(Show var)
*(pause)
       set var client_num = (.client_num+1)

*(show var)

       insert into IR (CLIENTID,FUNDSRCE,SERVV_LAST,SERV_FRST,servcat, +
       
DATE_SERV,DATEENT,IR_CODE,REG_CODE,AREA,TIME_SPENT,New_group,location) +
        values (.client_id, .vFUNSRCE,.vSERV_LAST,.vSERV_FRST,.vservcat, +
        .vDATE_SERV,.vDATEENT,.vIR_CODE,.vREG_CODE,.vAREA,.vTIME_SPENT, +
        .vNew_group,.vLocate)
*(     set var vnew_group='N')

*(show var)

       set var client_txt=(ssub(.client_str,.client_num))
endwhile

ENDIF
======================================================================>>
That sounds very similar to what I'm trying to do (although I'd loop
through
staff instead of clients).  Is this a while loop?

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of K Kleinman Zajac
> Sent: Monday, July 16, 2001 11:28 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Insert multiple records using a list of values
>
>
> If I understand your questin properly, I think I have done something
> similar.  Inour case, we provide group services to groups of
> varying size.
> 90% of theinformation for each client remains the same, only teh clientid
> changes.  What I have done is set up an eep that fires when I
> exit the row.
>  I pops up a list of all cleints (names) registered for the
> service and the
> user checks off all the clients that received that service.  The eep goes
> into a loop.  Each iteration reads the next name on the list, looks up
the
> id and creates a record of that service based onthe information enterd by
> the user and the id it just looked up.
>
> Is this the kind of thing you need?
> <<

Reply via email to