Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Change Field(#TREEITEMS) To(*NULL)
  • Select Fields(#DEPTMENT #SECTION #EMPNO #SURNAME #GIVENAME) From_File(PSLMST)
    Select Fields(#LISTVIEW) From_File(PSLMST)
    Fetch Fields(#DEPTDESC) From_File(DEPTAB) With_Key(#DEPTMENT) Keep_Last(50)
    Fetch Fields(#SECDESC) From_File(SECTAB) With_Key(#DEPTMENT #SECTION) Keep_Last(50)
    Use Builtin(BCONCAT) With_Args(#GIVENAME #SURNAME) To_Get(#FULLNAME)
    Add_Entry To_List(#LISTVIEW)
    Set Com(#ListView.currentitem) Image(#vi_employ)
    Endselect
    Endroutine
    Evtroutine Handling(#VSPLIT.Click)
    Set Com(#layout2) Orientation(vertical)
    Set Com(#VSplit) Enabled(False)
    Set Com(#HSplit) Enabled(True)
    Endroutine
    Evtroutine Handling(#HSPLIT.Click)
    Set Com(#layout2) Orientation(horizontal)
    Set Com(#HSplit) Enabled(False)
    Set Com(#VSplit) Enabled(True)
    Endroutine
    Evtroutine Handling(#PB_OK.Click)
    Invoke Method(#COM_OWNER.CLOSEFORM)
    Set Com(#com_owner) Modalresult(ok)
    Endroutine
    End_Com
    Field Source
    Begin_Com Role(*EXTENDS #PRIM_OBJT)
    Begin_Com Role(*Visual #PRIM_EVEF) Name(#ENTRYFIELD) Defaultvisual(True) Height(19) Usepicklist(False) Width(209)
    End_Com
    Begin_Com Role(*prompter #EMPNOPRMT) Name(#PROMPTER) Defaultprompter(True)
    End_Com
    End_Com
    Form Source
    Function Options(*DIRECT)
    Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(147) Clientwidth(492) Height(174) Left(369) Top(152)
    Define_Com Class(#PRIM_GRID) Name(#GRID) Captionnoblanklines(True) Componentversion(1) Displayposition(1) Height(128) Left(41) Parent(#COM_OWNER) Showbuttonselection(True) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(9) Width(344)
    Define_Com Class(#PRIM_GDCL) Name(#GDCL) Displayposition(1) Parent(#GRID) Readonly(False) Source(#EMPNO) Width(30)
    Evtroutine Handling(#COM_OWNER.CreateInstance) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
    Select Fields(#SECTION) From_File(PSLMST)
    Add_Entry To_List(#GRID)
    Endselect
    Endroutine
    End_Com
    Appearance
    Image RemovedImage Added Image Removed

Image Added
Note:
In the OK button click handler the following line is used to inform the calling field that the prompter is being closed successfully and that a new value has been chosen.
Set Com(#com_owner) Modalresult(ok)
If the above line was not present then the calling field would presume the prompter form was cancelled and was not successful so would not try to retrieve a new value for the field.
&<img src="../resources/images/opentoc-dark.png" title="Open Contents List" border="0"&>