Result Objects

To find out how the user interacted with your dialog box, you use result objects. A result object is returned when you call the Execute method of the dialog object. Two methods allow you to find out what the values are in the result object: ValueOf and ArrayOf.

  • ValueOf takes the name of a control or group of controls in the dialog box and returns a single current value.

  • ArrayOf also takes the name of a control or group of controls but returns an array of values instead of a single value.

Call ValueOf when the dialog box control you are interested in returns a single value: examples of such controls are text input fields and groups of radio buttons. Call ArrayOf when the dialog box control returns an array of values: examples would be a multi-select list or a group of checkboxes.

 

AllValues

Returns a string that lists all the values in the result object. Used for debugging purposes only.

 

ArrayOf

Takes as an argument the name of a multi-select control such as a multi-select list or a group of checkboxes. Returns an array of the items that are selected.

 

Dialog

The dialog object that produced this result object.

 

ValueOf

Takes as an argument the name of a  control that can return only one value, such as a single-select list, a group of radio buttons, or a text input field. Returns the value of the control.