/************************************************************************* File : myDataDigger-filterValues.p Purpose : Example procedure for using filterValue custom hooks Place this file in your DataDigger folder and rename it to myDataDigger.p Then run DataDigger against the sports database. More info, see https://github.com/patrickTingen/DataDigger/wiki/Customize-FilterValue *************************************************************************/ DEFINE VARIABLE myCustNum AS CHARACTER NO-UNDO. PROCEDURE customGetFilterValue: /* * Name: customGetFilterValue * Desc: After the data browse is created, the filter fields * are created one by one. You can use this routine to * give them a default value. */ DEFINE INPUT PARAMETER pcDatabase AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pcTable AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pcField AS CHARACTER NO-UNDO. DEFINE INPUT-OUTPUT PARAMETER pcFilterValue AS CHARACTER NO-UNDO. /* Set a particular field to a specific value */ IF pcField = "Cust-Num" THEN pcFilterValue = myCustNum. END PROCEDURE. /* customGetFilterValue */ PROCEDURE customSaveFilterValue: /* * Name: customSaveFilterValue * Desc: Perform actions based on the value of a filter */ DEFINE INPUT PARAMETER pcDatabase AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pcTable AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pcField AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pcFilterValue AS CHARACTER NO-UNDO. /* Example code: save value of a particular field */ IF pcField = "Cust-Num" THEN myCustNum = pcFilterValue. END PROCEDURE. /* customSaveFilterValue */