Case Statement (OpenInsight Specific)
At 23 JUN 1998 11:18:24AM Richard Richter wrote:
I am trying to create a GOTFOCUS event for an edit table. The idea is when the table gets focus, the event checks if the first column of the row is null. If null, it resets the cursor to the first column of the row and runs a popup to determine the information to be entered into the first column. The popup returns the value Sel. I then run a Case statement and if Sel=1 I run another popup.
The first popup runs perfectly. The case statement does not seem to run at all. All I get is a beep from the computer speaker. The script looks like this:
<code> Declare Function Repository,Get_Property Declare Subroutine Msg Pos=Get_Property(CtrlEntID,"ACCESSPOS") Col=Pos;Row=Pos Doc=Get_Property(CtrlEntID,"CELLPOS",1:@FM:Row) If Doc=" Then v=Set_Property(CtrlEntID,"SELPOS",1:@FM:Row) Sel=Repository("EXECUTE","DENT*POPUP**CT_DOC#_INSERT",@WINDOW,"") Begin Case Case Sel=1" ** Payment DocID=Repository("EXECUTE","DENT*POPUP**DOCTORS",@WINDOW,"") * Case Sel=2 * Payment * Case Sel=3 * Positive Adjustment * Case Sel=4 * Negative Adjustment * Case Sel=5 * Memo End Case End RETURN 0</code>
Any help would be greatly appreciated.
Richard Richter
At 23 JUN 1998 11:45AM Cameron Revelation wrote:
Richard,
You are getting a VNAV (variable not assigned value) error and because debugger is disabled you just hear a beep. The line:
Case Sel=1" Payment is compiled as the string "1" raised to the power of the variable Payment which is not assigned! Cameron Purdy Revelation Software </QUOTE> —- === At 23 JUN 1998 01:34PM Don Bakke wrote: === <QUOTE>You should place a semi-colon after the number and before the asterick: Case Sel=1" ; Payment