Script a Custom View of a Roster

All Roster Tags contain two publicly-accessible arrays describing the contact list. You can use either in an expression to build a customized view of the tag's contact list. This list is not editable. For editing, you must use the properties dialog for each of your Roster tags.

The arrays are named AllContactsand EnabledContacts.

These arrays contain entries for the contacts in your roster (either all or enabled) in the order in which they will be contacted. The same person may appear more than once in the array if the roster order includes repetitions.

 

For each contact in the array, the following information is available as a structure.

  Contact Struct [
    Name                      { Name of contact                               };
    Number                    { Phone number/email address                    };
    Method                    { 0 Voice
                                1 Pager
                                2 Email
                                3 SMS Text Message
                                4 Compact email                               };
    Enabled                   { TRUE if contact is enabled; FALSE otherwise   };
    Delay                     { Seconds to wait after notifying this contact  };
  ];

Example:

To display the name and number of the first contact in the EnabledContacts array of a Roster tag named MyRoster, use:

Concat([<MyRoster>].EnabledContacts[0].Name, ": ", [<MyRoster>].EnabledContacts[0].Number)

(This example assumes that you are working in the Idea Studio, creating a page or widget, or else creating an expression in an I/O and Calculations tag.)

For further information about working with arrays, including finding the size of the array and stepping through it, refer to Array Functions