Customize interview user input options

Customize interview user input options

A number of options are provided to customize user input options in a Web Determinations interview.

What do you want to do?

Specify the type of input

Specify individual date and time edits

Specify the values for a restrictive input control

Source list contents from an external file

Specify a dynamic default for an input

Specify a default value for an input

Make an input mandatory

Specify the type of input

For every attribute collected on a screen, you have several choices when defining your screen as to how the user can input their answer:

 

To specify the input type:

  1. In your screens file, double click to open the screen containing the question.
  2. Click on the question in the left hand pane to open it for editing in the right hand pane.
  3. Select the Input type from the drop-down list.
  4. Click OK.

 

NOTE: For booleans collected with a checkbox, checked means true and unchecked means false. As a consequence, any boolean that is collected via a checkbox will always get a value as soon as the screen is submitted. It also means that the concept of mandatory is meaningless, so all boolean checkbox inputs will always be rendered without the mandatory flag.

Specify individual date and time edits

For inputs for date, time and date/time variables, you can choose whether to display a single text entry edit, or individual edits for the components of the attribute (date/time/year/month/day/hour/minute/second components, depending on the attribute).

  1. In your screens file, double click to open the screen containing the date, time or date/time question.
  2. Click on the question in the left hand pane to open it for editing in the right hand pane.
  3. The Input type must be set to Default to use individual edits.
  4. Under the Style section, select the appropriate Input Type option. All controls have the Single Edit option, which produces a single text entry box for the user to type freely into. Additional options are:
  5. Additionally, you may specify the minimum Minute increment and Second increment for time and date/time variables, in common increments. (Note that Second increment is disabled if the input type chosen does not include seconds.)



  6. Most of these individual edits are displayed as drop down lists, allowing users to select from valid options. Year/date/time edits are displayed as text entry fields.

Note that if the Single Edit option is chosen for a date/time or time variable, the user can omit seconds and these will be set to 00 by default.

Specify the values for a restrictive input control

When collecting data, particularly variable data, you may want to limit the set of possible answers a user may provide using a restrictive input control (ie list boxes, drop down lists or radio buttons). For example,

NOTE: By default drop down lists are searchable and configurable. For more information, see Change the appearance of a drop down list in Oracle Web Determinations.

TIP: Where a variable can only take on one of a fixed list of values, use a drop down list to collect the value from the user. Use this variable in interpretive rules to infer a number of separate boolean attributes, one for each possible value. Then use these boolean attributes in source rules. Do not use the variable value directly in source rules.

 

Once you have defined the restrictive input control (see Specify the type of input above), you need to specify the range of possible values for it. To do this:

  1. In your screens file, double click to open the screen containing the question.
  2. Click on the question in the left hand pane to open it for editing in the right hand pane.
  3. In the Values section, select the Specify selection items option.
  4. Click the New button.
  5. Change the values in the Value and Display Text text boxes from "new" to the values you want in the control. Ensure the values you enter are in the correct format.



    NOTE: Value is the actual value passed to the Oracle Determinations Engine, whilst Display Text is what the user sees on the screen. Sometimes it is appropriate for these two values to be different. Display Text is a text value and will always be shown in the form you specify here; it will not be formatted according to the rulebase regional settings.

    TIP: You can use attribute substitution in the Display Text. For example:



    This would appear in Oracle Web Determinations as:



    For more information on using attribute substitution, see Substitute an attribute value into the text on screens.

Source list contents from an external file

For attributes of input type "List Box", "Drop Down List" or "Radio Buttons", it is possible to source attribute values from an external XML file.

To source list contents from an external file, do the following:

  1. Create a new folder \Development\include\lists\<session locale>.
  2. Create an XML file in this directory.
    Note: The name of the XML file should be related to the list it will be used for (for example, JobIndustry.xml).
  3. In the XML file, add XML nodes for the various list options. For example, to create list options for a Job Industry list input, with Finance and IT as the list options:
  4. <?xml version="1.0" encoding="utf-8"?>

    <list>

    <option text="Finance" value="Finance" />

    <option text="IT" value="IT" />

    </list>

  5. Save the XML file using UTF-8 encoding.
  6. In Oracle Policy Modeling, open your screens file and double click to open the screen containing the question.
  7. Click on the question in the left hand pane to open it for editing in the right hand pane.
  8. In the Values section, select the Specify list name option.
  9. In the text field, enter the name of the XML file (eg JobIndustry).
  10. Click OK.

If there are any problems with this file at runtime (for example, the file doesn't exist or uses the wrong XML structure), the static list options are used (if they exist for the list control).

NOTE: This xml list implementation does not currently support visibility or default values, but it does support the use of attribute substitution in option text.

Specify a dynamic default for an input

It is possible for controls to have a dynamic default value, that is, a default value that is derived from the value of another attribute. During a Web Determinations interview, the default value for the control will be set to the value of the attribute that it is based on if it is known, or it will default to the user specified value if the dynamic default value is unknown.

To specify a dynamic default value for an attribute control:

  1. In your screens file, double click to open the screen containing the question that you want to add the dynamic default to.
  2. Click on the question in the left hand pane to open it for editing in the right hand pane.
  3. In the Dynamic Default Value section, click the browse button next to the Attribute field.
  4. In the Attribute Selector, select the attribute to base the default value on, then click OK.
  5. Click OK.

NOTE: A dynamic default attribute may be in the global entity, in the same entity as the control it is attached to, or if the control is for an entity collect, it may be in the screen entity.

Specify a default value for an input

Specifying default values for inputs speeds data collection and assessment processing. The default value is the value that will be selected/shown when the input control is displayed.

To specify a default value for an input:

  1. In your screens file, double click to open the screen containing the question.
  2. Click on the question in the left hand pane to open it for editing in the right hand pane.
  3. If the attribute has an input type of Default, then in the Value section select or specify a default value for the input.











  4. If the attribute has an input type of List Box, Drop Down List or Radio Buttons, then in the Value section select the value in the list that you want as the default, and then click the Selected by default checkbox.

Make an input mandatory

The rulebase will not necessarily need answers other than uncertain to any or all the questions on a screen. When designing screens you should therefore consider which answers should be mandatory and which ones should allow uncertainty. For more information, see Decide whether to allow uncertainty in user answers.

 

To specify that an input control can allow uncertainty (ie allow a user to enter an uncertain value for the input control):

  1. In your screens file, double click to open the screen containing the question.
  2. Click on the question in the left hand pane to open it for editing in the right hand pane.
  3. In the Mandatory section, select the Allow Uncertain option from the drop-down list for Default State.



  4. Click OK.

This will mean that the input will always allow an uncertain option.

 

To specify that an input control can only allow uncertainty in some situations, then you need to create an attribute (and associated rules) to control in which circumstances the question will be mandatory. For example,

the pregnancy question should be mandatory if

the pregnancy question should be displayed

the pregnancy question should not be displayed if

there is not a female in the household who is aged 10 to 60 years (inclusive)

 

To add this attribute to the input control:

  1. In the Mandatory section, click the browse button next to the Attribute field.
  2. In the Attribute Selector, select the attribute to base the value on, then click OK.
    TIP: The mandatory control attribute is expected to be boolean – a value of true means mandatory, a value of false means not mandatory (ie optional) so a wording for the control attribute such as "x should be mandatory" is recommended.
    NOTE: A mandatory attribute may be in the global entity, in the same entity as the control it is attached to, or if the control is for an entity collect, it may be in the screen entity. The value of the mandatory attribute can not be temporal.
  3. Select the Default State for the input control (ie Mandatory or Allow Uncertain). This is the state that the attribute will appear in if the mandatory control attribute is unknown or uncertain.
  4. Click OK.

 

The rules relating to the use of Allow Uncertain are as follows:

  1. For inputs where Allow Uncertain is not selected (that is, mandatory inputs), a blank string will be treated as not having supplied a value for this input and will therefore trigger an error.
  2. For inputs where Allow Uncertain is selected, a blank string:
    1. Will be treated as the value Uncertain for all inputs except text inputs.
    2. In the case of text inputs, a blank string will be treated as blank string and the text 'uncertain' will be treated as setting the input to the string value Uncertain.
  3. For boolean checkbox inputs, the concept of mandatory is meaningless, so these inputs will always be rendered without the mandatory flag.

 

See also: