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.
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:
|
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>