Prompt types

The prompt type controls the information that is required from operators to run a tool. When prompts are displayed during the execution of a tool, all prompt fields are required, with the exception of password prompts. When a password prompt is displayed, the password can be left blank.

For sample prompts, see the WEBGUI_HOME/waapi/etc/samples/samplerequest_prompt.xml file.

The following table lists the prompt types that are supported.

Table 1. Prompt types
Prompt type Description
String Accepts one or more characters. If multiple prompts are defined for a tool, all prompts are displayed on a single panel. The order in which the prompts are displayed is controlled by the order attribute.
Tip: To display a prompt last on the panel, set the order attribute to 0.
Integer Accepts an integer value with a minimum value of -2,147,483,648 and a maximum value of 2,147,483,647 (inclusive).
Float Accepts a floating point number, which can contain a decimal point.
Restriction:
  1. In all event lists, decimal values can be expressed only by a period (.), regardless of the locale. In the Event Viewer, decimal values can be expressed to only 2 decimal places. For example, 1.23 is accepted, whereas 1.234 is not. The AEL has no restrictions on the number of decimal places.
  2. The number cannot exceed 17 digits. This limit includes the fractional part of the number. If the number exceeds 17 digits it is rounded off to a maximum of 17 digits when you click outside of the float text box.
Time Accepts a time and date. You can enter times and dates as free text or by clicking the selector buttons next to the text fields and selecting values.
Lookup Creates a menu or list that is populated by the values in a specified file. The file attribute contains an absolute path to a file in the server, where each line of text is displayed as an item in a list.
Password Accepts one or more characters as a password.
Dynamic Choice Creates a popup menu or a list that is populated by the results of a query on the ObjectServer.

The sqlCommand attribute contains an ObjectServer SQL SELECT statement for two columns from a table. Each row that is returned by the ObjectServer is displayed on the client as an item in a submenu or list.

Remember: If a tool that contains this prompt type is run against multiple ObjectServers that have different column definitions, you can select only from the columns or column values that are common to all ObjectServers.
Multiline String Creates a multiline prompt window that accepts one or more characters.
Tip: Use the order attribute to enforce a mandatory journal entry as the last prompt to be completed by a user. This function is similar to the forced journal entry functionality in the event list. Create a multiline string prompt, enter a name of Journal entry and an order of 0.
Formatted String Accepts one or more characters, provided the characters are in the predefined format. The format attribute contains a regular expression that must be matched for the value to be accepted.
Real-Time Dynamic Choice Creates a scrollable list that is populated by the results of a query on the ObjectServer in real time. Use this prompt type to display data from ObjectServers that contain data that changes frequently. Because this prompt type is run in real time, use it sparingly so that the server is not overloaded.

The sqlCommand attribute contains an ObjectServer SQL SELECT statement for two columns from a table. Each row that is returned by the ObjectServer is displayed on the client as an item in a submenu or list.

Remember: If a tool that contains this prompt type is run against multiple ObjectServers that have different column definitions, you can select only from the columns or column values that are common to all ObjectServers.

Example

The following example shows a dynamic choice prompt type:

<methodCall xmlns:prompt="http://www.ibm.com/tivoli/netcool/webtop/prompts/2.2">
  <method methodName="command">
   <prompt:prompt type="DynamicChoice" name="prompt name">
    <prompt:parameters label="prompt label" order="prompt order" errorMessage="error message" localized="true|false">
     <prompt:additionalParams>
      <prompt:param name="sqlCommand" value="sql string"/>
     </prompt:additionalParams>
    </prompt:parameters>
   </prompt:prompt>
  </method>
</methodCall>