New Entry (OpenInsight Specific)
At 05 JUN 1998 09:19:36AM Richard Richter wrote:
I have one OIS 3.6 table that does not signify in the window title. I have tried creating key numbers way beyond the highest and without any success. I've checked the Database/Utilities/OpenInsight Tables/LH Table Info and the settings are correct. I can read and write to the file normally. Is there anything that I'm missing?
At 05 JUN 1998 11:04AM Blaise(Revelation) wrote:
Richard,
Do you always see this behavior when dealing with this table? On every form? This does sound a bit weird as I am not able to reproduce it nor have I ever heard of it before. Could you tell me a bit more about the table or anything else for me to go on?
Thanks…
Blaise
At 05 JUN 1998 11:25AM Cameron Revelation wrote:
Richard,
It sounds like you are interrupting a system event either by:
a) a "RETURN 0" on an event that the system needs (change it to "RETURN 1")
b) your event is setting (or calling something that sets) an error status
Let us know if you still are having problems.
Cameron Purdy
At 05 JUN 1998 01:04PM Richard Richter wrote:
I made sure all the events were RETURN 1. I created a test form accessing the table and it also did not show a new entry. There were only simple editlines and no scripts. I can access all the rows from System Editor and the recors appear in Reporter.
At 05 JUN 1998 01:37PM Andrew P McAuley wrote:
Is it a two part key for which you are only prompting for the first?
World Leaders in all things RevSoft
At 05 JUN 1998 02:54PM Richard Richter wrote:
No it's a single key. In the original program, I used SeqKey. In the test program, I had nothing added.
At 05 JUN 1998 04:49PM Cameron Revelation wrote:
Richard,
The label shows up when the Semantic Logic Layer ($SEMANTICLOGICLAYER) handles the READ event. It calls the actual READ implementation ($FORMREAD) which returns a status of FS100 if the record is new (i.e. it doesn't exist). The Semantic Logic Layer then modifies the title as follows:
setCaptionSuffix (winID, SUFF_NEWENTRY$)
The insert CaptionSuffix_Equates defines:
EQU SUFF_NEWENTRY$ TO ResToString( WINRES_NEWENTRY$, SYSRES_SYSTEM$ )
Cameron Purdy
At 05 JUN 1998 05:56PM Richard Richter wrote:
I don't think any of that is happening. It seems to me it's associated with the table and not the form. Is there anything I can do to correct the problem?
At 05 JUN 1998 06:06PM Cameron Revelation wrote:
Richard,
I don't think any of that is happening. It seems to me it's associated with the table and not the form. Is there anything I can do to correct the problem?
Let's start at the beginning. When you enter a key value and tab off of it, does a READ event occur? The easiest way to check is to have the System Monitor open and to watch what events are fired.
Cameron Purdy
At 05 JUN 1998 09:42PM Richard Richter wrote:
No it doesn't fire a READ event. I checked it in the System Monitor and it obviously didn't read the record into the form. I want to really thank you for your helping me. I hope you know how much it's appreciated.
At 08 JUN 1998 09:02AM Cameron Revelation wrote:
Richard,
No it doesn't fire a READ event. I checked it in the System Monitor and it obviously didn't read the record into the form.
This is progress! The "" thing (which is soft-coded in the system resources located in SYSENV in case you are curious) is put there on READ but READ doesn't get run so now we know to figure out why it doesn't.
I have a form in SYSPROG (yours is probably in your own app) which is called TEST_KEYS3 with a key field called ID. This is what I get when I put a value into the key field and tab off:
RUN_EVENT calling:SYSPROG*LOSTFOCUS*TEST_KEYS3.ID …
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* …
RUN_EVENT calling:SYSPROG*READ.WINDOW.OIWIN* …
RUN_EVENT calling:SYSPROG*SYSMSG..OIWIN* …
RUN_EVENT calling:SYSPROG*..OIWIN* …
RUN_EVENT calling:SYSPROG*..OIWIN* …
RUN_EVENT calling:SYSPROG*GOTFOCUS..OIWIN* …
RUN_EVENT calling:SYSPROG*..OIWIN* …
See how the LOSTFOCUS on the key field determines that a READ should occur so it sends a READ to the window. The GOTFOCUS is for the other control that I tabbed to. Everything above happens automatically when I press tab from the key control.
Can you post what happens in yours? There are several things which could be wrong, so I don't want to guess.
I want to really thank you for your helping me. I hope you know how much it's appreciated.
Hey … let's get something straight here. You're the customer. The way it works is that our success is based on your success with our products.
Cameron Purdy
At 08 JUN 1998 02:01PM Richard Richter wrote:
I ran the program with the system monitor open. I selected from the LostFocus Run Event onward after tabbing into the next control. This is what I got:
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*GOTFOCUS..OIWIN* …
RUN_EVENT calling:SYSPROG*..OIWIN* …
RUN_EVENT calling:SYSPROG*LOSTFOCUS..OIWIN* …
Looking for:DENT*..OIWIN* …
Looking for:SYSPROG*..OIWIN* …
RUN_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*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* …
I've been in business for nearly 25 years (I'm not 21 anymore). I know you don't usually hear from people who want to praise you, so I know it's nice to hear a nice word sometime.
Richard Richter
At 08 JUN 1998 03:24PM Cameron Revelation wrote:
Richard,
Forward_Event calling:SYSPROG*LOSTFOCUS..OIWIN* …
On your key control you call forward_event, correct? That is what I believe I am seeing above. First guess, your call should look like:
Forward_Event(Flag, FocusID)
See the help file for more information on why you have to pass Flag and FocusID.
Next guess: Your dictionary item for the key field does not define the entire key. This is possible if the key is multi-part. Just take a quick look in the table builder.
Assuming both of those check out, create a quick-form (a test window) with just the key and one data field and see if it works. Let me know how this goes and we'll work from there.
Cameron Purdy
At 08 JUN 1998 06:15PM Richard Richter wrote:
Actually, that Forward_Event should have been Send_Event. The actual line of code should be
Send_Event(CtrlEntID,"READ")
After I changed the line of code, I got the following results in the System Monitor when I ran the test program:
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* …
There is no multi-part key. There is only one field listed as a key.
Just for safe keeping, here's the rest of the LOSTFOCUS script:
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 ThenEP=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 ElseEP=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 ThenRS=Xlate("REASON",RB,1,"X")If RS=" ThenRepository("EXECUTE","DENT*OIWIN**REASON",@WINDOW,"")Send_Event(CtrlEntID1,'F,':".REF_BY","GOTFOCUS")EndSet_Property(CtrlEntID1,'F.':".REF_BY_TEXT","TEXT",RS)EndIf Num(RB) And RB # "" ThenFN=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 # "" ThenFN=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 ThenEnableStatus=Set_Property(CtrlEntID1,"F.":".HLBP","ENABLED","1")End ElseEnableStatus=Set_Property(CtrlEntID1,"F.":".HLBP","ENABLED","0")EndNewID=Get_Property(@window,"@NEW")
v=Set_Property(CtrlEntID1,'F.':",TEMP","TEXT",NewID)
RETURN 1
Again, thanks for your help.
Richard Richter
At 12 JUN 1998 07:53AM Cameron Revelation wrote:
Richard,
On LOSTFOCUS, you should either just RETURN 1 or Forward_Event appropriately (with the additional parameters). The read is supposed to happen automatically. Do you have it working now?
Cameron Purdy
Revelation Software