{{tag>category:"OpenInsight Specific"}}
[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Read Event (OpenInsight Specific) ====
=== At 11 JUN 1998 03:35:48PM Richard Richter wrote: ===
I am having a problem on a form that I am creating. When I enter a key or use the SEQKEY I am not triggering a READ event. When I check the system monitor, I get the following:
RUN_EVENT calling:DENT*LOSTFOCUS*PATIENT_TEST.KEY ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*GOTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
I checked and there is no multiple key. There is only one key for the table.
Does anybody out have any ideas to help me correct the problem?
Richard Richter
----
=== At 11 JUN 1998 04:41PM Blaise(Revelation) wrote: ===
Richard,
Do you have any script in the LOSTFOCUS of the key field or the READ for the form? If you do, what are you returning for a value? If you don't, did you ever? If you did, how did you clear the script? You have to do an EDIT-CLEAR EVENT from the menu in order to clear the script completely from the repository so the script doesn't try to execute.
Let me know what you find.
Blaise.
----
=== At 11 JUN 1998 06:46PM Richard Richter wrote: ===
The script for the LOSTFOCUS event is:
Declare Subroutine Get_Property,Set_Property,Repository,Forward_Event,Send_Event
Send_Event(CtrlEntID,"READ")
* Print Name and Key on Page 2
Key=Get_Property(CtrlEntID,"TEXT")
LN=Get_Property(CtrlEntID1,'F.':".LAST_NAME","TEXT")
FN=Get_Property(CtrlEntID1,'F.':".FIRST_NAME","TEXT")
If LN # "" OR FN # "" Then, ":FN Else
* Set_Property(CtrlEntID1,'F.':".TEXT_2","TEXT",Key)
Set_Property(CtrlEntID1,'F.':".TEXT_5","TEXT",Key:" - ":Name)
Set_Property(CtrlEntID1,'F.':".TEXT_39","TEXT",Key:" - ":Name)
ZipCode=Get_Property(CtrlEntID1,'F.':'.ZIP','TEXT')
ZipRecord=XLATE('ZIP_CODES',ZipCode1,5,'','X')
v=Set_Property(CtrlEntID1,'F.':'.CITY','TEXT',ZipRecord)
v=Set_Property(CtrlEntID1,'F.':'.ST','TEXT',ZipRecord)
* If this is a Non Patient then disallow data entry in the following controls
CheckedStatus=Get_Property(CtrlEntID1,'F.':".NON_PATIENT","CHECK")
If CheckedStatus=1 Then
EP=Set_Property(CtrlEntID1,'F.':".LAST_EXAM","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".HISTORY","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".QUESTIONS","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".MEDICATIONS","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".PHYSICIAN","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".REASON_2","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".LAST_VISIT","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".RECALL_DATE","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".RECALL_PER","ENABLED","0")
EP=Set_Property(CtrlEntID1,'F.':".PATIENT_SCHOOL","ENABLED","0")
End Else
EP=Set_Property(CtrlEntID1,'F.':".LAST_EXAM","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".HISTORY","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".QUESTIONS","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".MEDICATIONS","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".PHYSICIAN","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".REASON_2","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".LAST_VISIT","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".RECALL_DATE","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".RECALL_PER","ENABLED","1")
EP=Set_Property(CtrlEntID1,'F.':".PATIENT_SCHOOL","ENABLED","1")
End
* If the Ref By control is a reason code or a key then set the text box
RB=Get_Property(CtrlEntID1,'F.':".REF_BY","TEXT")
If Not(Num(RB)) And Len(RB) LE 2 Then
RS=Xlate("REASON",RB,1,"X")
If RS=" Then
Repository("EXECUTE","DENT*OIWIN**REASON",@WINDOW,"")
Send_Event(CtrlEntID1,'F,':".REF_BY","GOTFOCUS")
End
Set_Property(CtrlEntID1,'F.':".REF_BY_TEXT","TEXT",RS)
End
If Num(RB) And RB # "" Then
FN=Xlate("PATIENT",RB,3,"X")
LN=Xlate("PATIENT",RB,2,"X")
Set_Property(CtrlEntID1,'F.':".REF_BY_TEXT","TEXT",LN:", ":FN)
End
* If the Acct Guar is a key then set the text box
RB=Get_Property(CtrlEntID1,'F.':".ACCT_GUAR","TEXT")
If Num(RB) And RB # "" Then
FN=Xlate("PATIENT",RB,3,"X")
LN=Xlate("PATIENT",RB,2,"X")
Set_Property(CtrlEntID1,'F.':".ACCT_GUAR_TEXT","TEXT",LN:", ":FN)
End
* If H/L Blood Pressure then enable access to HLBP
CheckStatus=Get_Property(CtrlEntID1,"F.":".HIST_BLOOD","CHECK")
If CheckStatus Then
EnableStatus=Set_Property(CtrlEntID1,"F.":".HLBP","ENABLED","1")
End Else
EnableStatus=Set_Property(CtrlEntID1,"F.":".HLBP","ENABLED","0")
End
NewID=Get_Property(@window,"@NEW")
v=Set_Property(CtrlEntID1,'F.':",TEMP","TEXT",NewID)
RETURN 1
Thanks for your help.
Richard Richter
----
=== At 11 JUN 1998 07:51PM DSig (SigSolutions) wrote: ===
Richard,
1) use the 'forward_event' instead of forcing a read. this will allow all OI event logic to process.
2) what happens if you remove the lostfocus event and any 'read' event code. copy them somewhere else then use the EDIT/Clear Event in the event editor and recompile. Does the form read correctly?
dsig
David Tod Sigafoos ~ SigSOlutions
dsig@teleport.com cis:70302,77 voice:503-639-8080
----
=== At 12 JUN 1998 09:56AM Blaise (Revelation) wrote: ===
Richard,
It's a bit hard to tell where the problem is just by looking at your code. If you want to do an APPBACKUP of your application and send it to me, I would be glad to install it here and troubleshoot it that way.
Let me know...
Blaise
----
=== At 12 JUN 1998 11:50AM Richard Richter wrote: ===
I changed the code to Forward_Event(CtrlEntID,""). I cleared out the LOSTFOCUS event with the Clear Event menu item and ran the program. I got the following results in the System Monitor when I tabbed out of the Key field editline:
RUN_EVENT calling:SYSPROG*GOTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*GOTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
As you can see, there's no read event and consequently there's no in the Window title bar.
Thanks for your help.
Richard Richter
----
=== At 12 JUN 1998 01:11PM Jeff Blinn wrote: ===
Richard,
In your original code I would think the Send_Event should be more like Send_Event(@window,'READ') instead of CtrlEntId. Isn't the read event attached to the window (not the control on the window)?
Forward_Event should only pass parameters in addition to CtrlEntId and ClassId - in this case Forward_Event() should work. Although, I recently had reason to question whether a Forward_Event command in a LostFocus event actually executes other events. It seems Forward_Event certainly completes the current event chain (LostFocus chain), but I'm not sure it also executes other events that may have been triggered. Maybe someone else can clear that up . . .
Jeff
----
=== At 12 JUN 1998 08:39PM Richard Richter wrote: ===
I changed the Send_Event to a Forward_Event and I still don't get the in the window title bar. The System Monitor shows the following commands when I tab from the Key field to the next field:
RUN_EVENT calling:DENT*LOSTFOCUS*PATIENT_INFORMATION10.KEY ...
Looking for:DENT*LOSTFOCUS*PATIENT_INFORMATION10 ...
Looking for:DENT*LOSTFOCUS.EDITFIELD.OIWIN* ...
Looking for:SYSPROG*LOSTFOCUS.EDITFIELD.OIWIN* ...
Looking for:DENT*LOSTFOCUS..OIWIN* ...
Looking for:SYSPROG*LOSTFOCUS..OIWIN* ...
Forward_Event calling:SYSPROG*LOSTFOCUS..OIWIN* ...
Looking for:DENT*..OIWIN* ...
Looking for:SYSPROG*..OIWIN* ...
Forward_Event calling:SYSPROG*..OIWIN* ...
Looking for:DENT*LOSTFOCUS.EDITFIELD* ...
Looking for:SYSPROG*LOSTFOCUS.EDITFIELD* ...
Looking for:DENT*LOSTFOCUS* ...
Looking for:SYSPROG*LOSTFOCUS* ...
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
RUN_EVENT calling:SYSPROG*GOTFOCUS..OIWIN* ...
RUN_EVENT calling:SYSPROG*..OIWIN* ...
Thanks for the help. Anyone have any other ideas?
Richard Richter
----
=== At 13 JUN 1998 02:29AM Don Bakke wrote: ===
Richard,
You certainly have a puzzler here. I looks to me as if the window won't compile a reference to any level of a READ event. Have you looked in the SYSREPOSEVENTS and SYSREPOSEVENTEXES tables to see if a rogue READ or LOSTFOCUS events exists for this form? Have you run SCAP_REP to see if any orphaned/rogue events exist for the form? I've had forms misbehave this way, even though the Form Designer said there were no events but they did exist.
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 13 JUN 1998 03:40PM Aaron Kaplan wrote: ===
Was there nothing in [url=http://www.revelation.com/WebSite/discuss.nsf/09d90959a1a106db8525652c0042cb86/e99e7c1e39da5b988525661a00493503?OpenDocument]this thread[/url] that helped at all?
akaplan@sprezzatura.com
[url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url]
[img]http://www.sprezzatura.com/zz.jpg[/img]
----
=== At 13 JUN 1998 07:43PM Jeff Blinn wrote: ===
Can you try a Send_Event(@window,'READ') from your LostFocus routine?
Jeff
----
=== At 13 JUN 1998 09:45PM Cameron Revelation wrote: ===
Richard,
Could you look at [url=http://www.revelation.com/WebSite/discuss.nsf/09d90959a1a106db8525652c0042cb86/CBF34B664AFADEC08525661D006AA830?OpenDocument]this[/url] again ... I'd like to see if a new test form works if you create it from scratch. Do a File, New in the Form Designer and choose just the key and one data field. See if that works ... the answer determines which path we should be taking to determine what the problem is.
Thanks,
Cameron Purdy
Revelation Software
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=D02A80490C1B868D85256620006BA5FD|View this thread on the forum...]]