Skip to content

phmPromptUpdateCallback - cCJGridPromptList

Defines a custom message to be sent to the invoking object as part of the selection update process

Type: Property
Access: Read/Write
Data Type: Handle
Parameters: None

Syntax

Property Handle phmPromptUpdateCallback
Access Type Syntax
Read Access: Get phmPromptUpdateCallback to HandleVariable
Write Access: Set phmPromptUpdateCallback to HandleVariable/Value

Description

If phmPromptUpdateCallback is set to an event message, this event will be called as part of the prompt list's selection and update process. It calls the event and passed handle of the prompt object. This is called in addition to and after the normal update. Normally, you will only use this when peUpdateMode is umPromptCustom, since the umPromptCustom mode has no automatic mechanism for updating a selection.

This property is normally set within the invoking object's Prompt_Callback event.

Object oButton1 is a Button
    Set Location to 100 100

    Procedure PromptUpdate Handle hoPrompt
        String[] SelectedNames                    

        Get SelectedColumnValues of hoPrompt 1 to SelectedNames
        If (SizeOfArray(SelectedNames)) Begin
            Set Value of oMyStartForm to SelectedNames[0]
        End
    End_Procedure   

    Procedure Prompt_Callback Integer hPrompt
        String sValue

        Set peUpdateMode of hPrompt to umPromptCustom
        Set piUpdateColumn of hPrompt to 1 // on name column
        Set phmPromptUpdateCallback of hPrompt to (RefProc(PromptUpdate))
        Get Value of oMyStartForm to sValue
        Set psSeedValue of hPrompt to sValue
    End_Procedure

    Procedure OnClick
        Send Popup of Customer_sl
    End_Procedure

End_Object

The phmPromptUpdateCallback is not used when peUpdateMode is umPromptNonInvoking, as there is no invoking object to callback to.