|
Disable Button
|
Determines whether the button in the **Target** field is inactive.
|
Set the **Value** to `true` to disable a button or `false` to enable it.
|
|
Set Mandatory
|
Determines if the element in the **Target** field is required.
|
Set the **Value** to `true` to make the element mandatory or `false` to make it optional.
|
|
Set Read-only
|
Determines whether the element in the **Target** field is read-only.
|
Set the **Value** to `true` to make an element read-only, or `false` make the element editable.
|
|
Set UI Style
|
Applies UI styling to an element.**Note:**
This operation doesn’t reverse when using **Reverse If False** on your mobile UI rule.
|
Use this value to set a background color, font color, and text decorator icon. The value must be in JSON format. This example changes the colors of the background and text:
```
{
"BackgroundColor": "#E1E1E1",
"BackgroundColorVariable": "--now-color-secondary-3"
}
```
This example sets a text decorator icon.
```
{
"TextDecorator":{
"Type": "Font",
"FontName": "now-mobile-icons-cards",
"Value": "IconCode",
"FontColor": "#1E4335"
}
}
```
You can also use color variables to change theming in your mobile UI rules. For details see [Color variable support for UI rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/mobile/color-var-ui-rule.md).
**Note:**
- `IconCode` must be replaced with a valid icon code. For a list of icon codes, see [Mobile icons](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/mobile/sg-mobile-icon.md)
- Use a JSON validator when copying and pasting JSON code from a topic, to make sure all code is correctly applied.
|
|
Set Visibility
|
Determines the visibility of the element in the **Target** field is read-only.
|
Set the **Value** to `true` to display the element, or `false` to hide the element.
|
|
Simple Arithmetic
|
**Note:** This operation doesn’t reverse when using **Reverse If False** on your mobile UI rule.
|
Set the **Value** by creating a mathematical operation using inputs from the input form screen associate with your mobile UI rule. For example, if you wanted to calculate travel costs you could use:```
cost_per_mile*miles_traveled
```
In this example, the values in the `cost_per_mile` and `miles_traveled` inputs would be multiplied. For this operation to work, the input form screen would need inputs matching these names.
|
|
Time ago
|
Applies a time indicator to a record, for example "Updated 3 minutes ago" or "Created 2 months ago".**Note:** This operation doesn’t reverse when using **Reverse If False** on your mobile UI rule.
|
The following fields must be set:- In the **Operation** field, enter `Date Formatter`.
- In the **Target** field, set the target to a mobile view element that uses a DateTime input.
- In the **Value** field, enter `timeago`.
Use any of the following option parameters for `timeago`:
`timeago(negative text value, positive text value, verbose flag);`- **negative text value**
The value displayed for past dates, using `%d` in place of the numerical value.
- **positive text value**
The value displayed for future dates, using `%d` in place of the numerical value.
- **verbose flag**
Whether a short or long version of the time format is displayed. This field value is `true` or `false`.
For example, when set to true, '2 minutes ago' is displayed. If set to false, '2 m ago' is displayed.
In this example, you see values such as "Expired 5 hours ago" or "Expires in 5 days" depending on the time value.```
timeago(“Expired %d ago”, “Expires in %d”, true);
```
|
|
Time and date calculation
|
Automatically calculates an end time after entering a start time. The end time value can be in the past or the future. For example, you select a meeting to start at 15:00, the default calculation is set to 30 minutes later, so 15:30 displays as the default end time.**Note:** This operation doesn’t reverse when using **Reverse If False** on your mobile UI rule.
|
The following fields must be set:- In the **Operation** field, enter `Date Calculation`.
- In the **Target** field, set the target to an input form screen element that uses a DateTime input.
- In the **Value** field, enter the input structure using the following syntax <input name> +/- <duration>.
The duration value is formatted in the following way:
- `10d` = 10 days
- `5h` = 5 hours
- `3m` = 3 minutes
- `2s` = 12 seconds
For example, an entry of `start_time + 1d8h`sets the value to be calculated at 1 day and 8 hours after the start time.
**Note:** You can’t use month and year in the time and date calculation.
|
|
Record Summarization
|
Enables record summarization using Now Assist.**Note:** This operation requires Now Assist to be configured. For more information, see [Overview tab in AI Admin Hub](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/configuring-now-assist.md).
|
In the **Target Mapping** field, enter the string input field that the generated text should be added to.
|