Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- Adding a rule
- Add a Launch a URL rule
- Add a Run a Macro rule
- Add a Call a Process rule
- Add a Case Exchange rule
- Add a Run a Wizard rule
- Add a Clear Fields rule
- Add a JavaScript Validation rule
- Add a Run JavaScript rule
- Add a Set Mandatory Fields rule
- Add a Set Mandatory Variables rule
- Add a Send Notifications rule
- Add a Launch a Script rule
- Add a Send HTML Email rule
- Add a Start or Stop Clock rule
- Add a Set Field rule
- Add a Set Field from Number rule
- Add a Validate Date rule
- Add a Validation Against a List rule
- Add a Validate against Table rule
- Add a Validate Text/Number rule
- Add a Field Validation Against a Table rule
- Add a Popup Message Box rule
- Add an Assignment rule
- Add a Run Action rule
- Add a Run Scheduled Action rule
- Group rules
Add a JavaScript Validation rule
Applies to User Roles:
System Administrator
Implementer
This rule allows you to validate any JavaScript code a user enters.
To add a JavaScript Validation rule, follow these steps:
- In the System Navigator, click Tailoring > Process Designer > Rule Sets.
-
Click Search to open the Rule Set form, and then select the rule set to which you want to add the rule.
Note You can edit user-defined rule sets only. Out-of-box rule sets are labeled as HPE Proprietary and cannot be modified.
- Click Add Rule to open the Select Rule Type page, and then click JavaScript Validation.
- In the Rule Description field, type a description of your new rule.
-
Click Edit to add conditions to the rule.
Note
- If you do not specify a condition, the value defaults to Always.
- You may reference the current record as record in the JavaScript. For example, if the field in a form is a category, it may be referred to as follows: record.category=="xyz"
- You may reference the original copy of the record (before any changes were made by the user) as oldRecord in the JavaScript (that is 'oldRecord.category').
- You may set the returnCode variable in the JavaScript to specify whether this rule was successful or should be treated as a failed validation. A return code of 0 (zero) is considered successful (it is the default), any other code is unsuccessful. The return code must be a numeric value.
-
Note
- If you do not specify a condition, it will default to Always.
- You may reference the current record as record in the JavaScript. For example, if the field in a form is a category, it may be referred to as follows: record.category=="xyz"
- You may reference the original copy of the record (before any changes were made by the user) as oldRecord in the JavaScript (that is 'oldRecord.category').
- You may set the returnCode variable in the JavaScript to specify whether this rule was successful or should be treated as a failed validation. A return code of 0 (zero) is considered successful (it is the default), any other code is unsuccessful. The return code must be a numeric value.
- You may set the message variable in the JavaScript to specify a message that displays to the user if the rule is unsuccessful (returns a non-zero return code).
- You may set the cursorPosition variable in the JavaScript to specify a field on the current form where the cursor should be placed if the rule is unsuccessful.
- Enter the JavaScript in the text box.
- Click OK to add the new rule to the rule set.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to ovdoc-ITSM@hp.com.
Help Topic ID:
Product:
Topic Title:
Feedback: