Hi, 

On creating a new consultation I have to insert a StudyUID in the row after it 
is saved.

I'm trying to do this by running a stored procedure in the "on close " EEP:

SAVEROW
SET VAR vdatetime= (FORMAT(.#now,'DDMMYYYYHHNNSS'))
SET VAR vdate TEXT =(CTXT(.vdatetime))
SET VAR vstudyuid TEXT = .vdate
SET VAR vstudyuid TEXT = (SGET(.vdate,14, 1))
SET VAR vstudyuid TEXT = ('31055' + .vstudyuid)
UPDATE consult SET studyuid = .vstudyuid WHERE consultnummer = .vconsult
SET DATE FORMAT DD/MM/YYYY
SET TIME FORMAT HH:MM:SS
RETURN

The problem is  that this doesn't work when I close the form the first time 
after creating the consultation.

When I return to this form a second time and close it, then it runs as it 
should and the studyUID is saved to the row.

I tried everything I could think of (after saving row, after inserting row EEP 
on the table....)

What am I missing here ?

Luc Delcoigne

Reply via email to