dlgEvent__action__AfterVCard

Function called by relation event after selecting a virtual contact card.

Syntax

PUBLIC FUNCTION dlgEvent__action_action_AfterVCard( 
   dlg ui.DIALOG, errNo INTEGER, errMsg STRING, vcard STRING, person VCPerson, 
   vcAddress VCAddress_Type, phone VCPhone_Type, email VCEmail_Type)

The action part of the function name is defined by the Action property of the relation (under Source UI Settings) . If the Action property is not set, an error will occur at compile time.

The function has eight parameters:

  1. dlg. This is a ui.DIALOG object referencing the current dialog. The dialog can implement an INPUT, INPUT ARRAY, DISPLAY ARRAY, MENU, or CONSTRUCT. For more information, see The Dialog class in Genero Business Development Language User Guide.
  2. errNo. This is an SQLCA.SQLCODE error.
  3. errMsg. This is the SQLERRMESSAGE message.
  4. vcard. This is the returned vCard value.
  5. person. This is the contact's name.
  6. vcAddress. This is the contact's address.
  7. phone. This is a dynamic array containing the contact's phone numbers.
  8. email. This is a dynamic array containing the contact's email addresses.

Usage

When you select the After vCard Select property for the creation of the event, a function shell is created. Enter your code in the function.

This function is called when a vCard is selected.

Example: After vCard Select

This example uses the After vCard Select code event on a relation. The Action property of the relation is set to select. Every time a user selects a vCard, a message is displayed.

PUBLIC FUNCTION dlgEvent__action_select_AfterVCard(dlg ui.DIALOG, errNo INTEGER, errMsg STRING, vcard STRING, person VCPerson, 
                                             vcAddress VCAddress_Type, phone VCPhone_Type, email VCEmail_Type)

   IF errNo == ERROR_SUCCESS THEN
        DISPLAY "Returned vCard " || vcard || "for " ||  person
    ELSE
        DISPLAY "ERROR: [" || errNo || "] " || errMsg
    END IF
    
END FUNCTION