Share via


Using Contacts in Forms

You can get information about and send messages to the contacts in a workspace, and to contacts specified in Forms tool records.

You can use contacts in scripts to accomplish tasks such as:

  • Automatically sending a message to a contact on an unusual event or condition. For example, in a Forms tool that tracks projects, a script can send a message to the program manager (stored in a Contacts field on the record) whenever a project is completed earlier than scheduled.

  • Providing a script button on a form that displays the Send Message dialog to the user, and automatically addressing the message to the contact specified on the form.

  • Setting a Contact field on a form or in a record to a specified contact.

You can use contacts in macros to:

  • Ensure that all contacts specified in the Forms tool records are currently members of the workspace, and send invitations to the contacts who are not workspace members.

  • Test whether a phone number is missing from a form, and use the information from a Contact field to automatically set the phone number.

Workspace members and other contacts can be identified in the following ways:

  • Contact field on a form or in a record.

  • Field that contains the name or ContactURL of the contact.

You can get access to contacts in four ways:

  • From a field with a Contact type in a record using the GetContactFieldValue and SetContactFieldValue functions.

  • Workspace members can select the contact when they create or update a record.

  • Using the GrooveFormsToolUIDelegateCreateMemberNameURLEnum to get a list of the workspace members.

  • From a system field that stores a ContactURL, such as the _CreatedByURL field.

A Contact field in a record gives you direct access to the IGrooveFormsToolContact object. The CreateMemberNameURLEnum and system fields give you access to the ContactURL. You can use the IGrooveFormsToolContactServices to get the IGrooveFormsToolContact object associated with the ContactURL.

Contact fields and the contacts and messaging programming interfaces provide a mechanism to send messages from scripts and macros, but in order to use this feature, you should understand the details of how these objects function. This section summarizes the information about these objects.

Before sending a Groove instant message to a contact stored in a record, you must open the field and check the following items:

  • Is the field value defined? Test OpenField value for null.

  • Is the contact accessible? Test DoesContactExist.

  • Is the contact Groovey? Test IsGroovey.

In This Section

Accessing Contact Fields in Records

Getting the ContactURL from the Contact

Getting Contact Information

Accessing a Contact from a ContactURL

Creating NonGroovey Contacts

See Also

Concepts

Using Scripts in the Groove Forms Tool
Using Macros in the Groove Forms and InfoPath Forms Tools