Use Windows.pkg Use cCJGridPromptList.pkg Use cCJGridColumn.pkg Object oChooseField is a ModalPanel Set Border_Style to Border_Thick Set Label to "Choose field" Set Location to 4 3 Set Size to 130 145 Set piMinSize to 130 145 Object oSelList is a cCJGridPromptList Set Size to 104 141 Set Location to 2 2 Set peAnchors to anAll Set pbShadeSortColumn to False Set pbShowHeader to False Object oField is a cCJGridColumn Set piWidth to 100 End_Object Procedure Activating Forward Send Activating Send DoFillList End_Procedure Procedure DoFillList Integer iMaxFields iField iFieldtype iFile Integer iRow iStartField iFieldCol String sFieldname Handle hoDataSource tDataSourceRow[] lsData Get piColumnId of oField to iFieldCol Get piFileNumber to iFile Get_Attribute DF_FILE_NUMBER_FIELDS of iFile to iMaxFields Move 0 to iRow Get FirstFieldnumber to iStartField For iField from iStartField to iMaxFields Get_Attribute DF_FIELD_NAME of iFile iField to lsData[iRow].sValue[iFieldCol] Increment iRow Loop Send InitializeData lsData Send SortGridByColumn oField False End_Procedure End_Object Object oOK_btn is a Button Set Label to "&OK" Set Location to 112 15 Set peAnchors to anBottomRight Procedure OnClick Send Ok of oSelList End_Procedure // OnClick End_Object // oOK_btn Object oCancel_btn is a Button Set Label to "&Cancel" Set Location to 112 81 Set peAnchors to anBottomRight Procedure OnClick Send Cancel of oSelList End_Procedure End_Object Function SelectField String ByRef sField Returns Boolean Boolean bCanceled Integer iOldUpdateMode iFieldCol String[] sSelectedFields Get peUpdateMode of oSelList to iOldUpdateMode Set peUpdateMode of oSelList to umPromptNonInvoking Set psSeedValue of oSelList to sField Send Popup Set peUpdateMode of oSelList to iOldUpdateMode Get pbCanceled of oSelList to bCanceled If (not(bCanceled)) Begin Get piColumnId of oField to iFieldCol Get SelectedColumnValues of oSelList iFieldCol to sSelectedFields If (SizeOfArray(sSelectedFields) > 0) Begin Move sSelectedFields[0] to sField End End Function_Return (not(bCanceled)) End_Function End_Object