Use Windows.pkg Use dfRadio.pkg Use Constants\ConstantModes.pkg Object oMode_dg is a ModalPanel Property Boolean pbOk False Set Minimize_Icon to False Set Label to "Choose mode" Set Location to 6 18 Set Size to 190 204 Object oModeGroup is a RadioGroup Set Size to 132 155 Set Location to 9 26 Set Label to "Mode" Property String[] psaModes Property String psDefaultMode Object oEQ is a Radio Set Label to "=" Set Size to 10 21 Set Location to 10 12 End_Object Object oNE is a Radio Set Label to "<>" Set Size to 10 25 Set Location to 22 12 End_Object Object oLT is a Radio Set Label to "<" Set Size to 10 21 Set Location to 34 12 End_Object Object oLE is a Radio Set Label to "<=" Set Size to 10 25 Set Location to 46 12 End_Object Object oGT is a Radio Set Label to ">" Set Size to 10 21 Set Location to 58 12 End_Object Object oGE is a Radio Set Label to ">=" Set Size to 10 25 Set Location to 70 12 End_Object Object oContains is a Radio Set Label to "Contains" Set Size to 10 44 Set Location to 82 12 End_Object Object oMatches is a Radio Set Label to "Matches" Set Size to 10 44 Set Location to 94 12 End_Object Object oUppercase is a Radio Set Label to "Contains (case insensitive)" Set Size to 10 100 Set Location to 106 12 End_Object Object oNotUppercase is a Radio Set Label to "Does Not Contains (case insensitive)." Set Size to 10 134 Set Location to 118 12 End_Object Procedure Activating String[] saModes String sDefaultMode Integer iFoundMode Forward Send Activating Move C_FilterMode_Equal to saModes[0] Move C_FilterMode_NotEqual to saModes[1] Move C_FilterMode_LessThan to saModes[2] Move C_FilterMode_LessThanOrEqualTo to saModes[3] Move C_FilterMode_GreaterThan to saModes[4] Move C_FilterMode_GreaterThanOrEqualTo to saModes[5] Move C_FilterMode_Contains to saModes[6] Move C_FilterMode_Matches to saModes[7] Move C_FilterMode_ContainsCaseInsensitive to saModes[8] Move C_FilterMode_NotContainsCaseInsensitive to saModes[9] Set psaModes to saModes Get psDefaultMode to sDefaultMode Move (SearchArray(sDefaultMode, saModes)) to iFoundMode If (iFoundMode > -1) Begin Set Current_Radio to iFoundMode End End_Procedure Function FilterMode Returns String String[] saModes Integer iMode String sSelectedMode Get psaModes to saModes Get Current_radio to iMode If (iMode > -1 and iMode < SizeOfArray(saModes)) Begin Move saModes[iMode] to sSelectedMode End Function_Return sSelectedMode End_Function End_Object Object oFilterValue is a Form Set Size to 13 155 Set Location to 149 26 Property String psDefaultValue Procedure Activating String sDefaultValue Forward Send Activating Get psDefaultValue to sDefaultValue Set Value to sDefaultValue End_Procedure End_Object Object oOK_btn is a Button Set Label to "&OK" Set Location to 172 37 Set peAnchors to anBottomRight Procedure OnClick Set pbOK to True Send Close_Panel End_Procedure End_Object Object oCancel_btn is a Button Set Label to "&Cancel" Set Location to 172 125 Set peAnchors to anBottomRight Procedure OnClick Send Close_Panel End_Procedure End_Object On_Key kEnter Send KeyAction Of oOK_btn On_Key kCancel Send close_panel Function SelectMode String sFieldname String ByRef sValue String ByRef sMode Returns Boolean Boolean bOk Set pbOK to False Set psDefaultMode of oModeGroup to sMode Set psDefaultValue of oFilterValue to sValue If (sFieldname <> "") Begin Set Label of oMode_dg to (SFormat("Choose mode on %1", sFieldname)) End Else Begin Set Label of oMode_dg to "Choose mode" End Send Popup Get pbOK to bOk If bOk Begin Get FilterMode of oModeGroup to sMode Get Value of oFilterValue to sValue End Function_Return bOk End_Function End_Object