Fields Declarions -action assigmnets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 02:30 AM
Hi everyone,
i need to create icon field in SOW , i use Fields Declarions -action assigmnets but its not working onChange field.
how i can make it work onChange field to show the icon in SOW?
if have anther way to show icon in SOW by OnChange field?
TNX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 06:35 AM
To show an icon in a Statement of Work (SOW) field on change, you can use a Client Script or Field Decorators. Here’s how:
Option 1: Client Script
Create a New Field: Ensure you have a field (e.g., icon_field) to hold the icon.
Add a Client Script:
- Go to System Definition > Client Scripts.
- Create a new script:
- Table: Your SOW table.
- Type: onChange
- Field name: Your target field.
Script Example:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') return;
var iconHTML = '';
if (newValue === 'desired_value') {
iconHTML = '<img src="your_icon_url" alt="Icon" style="width:16px;height:16px;">';
}
g_form.setValue('icon_field', iconHTML);
}
Option 2: Field Decorators
Field Declaration:
- Go to System UI > Field Decorators.
- Create a decorator for the target field.
Configure:
- Set it to show an icon based on conditions, but note this may not respond to onChange.
Option 3: UI Policy
Create a UI Policy:
- Go to System UI > UI Policies.
- Define conditions for the icon visibility.
Add Actions:
- Use UI Policy Actions if needed.
if you found this helpful please accept as solution and mark helpful
best
Chetna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 06:50 AM
Hi,
tnx you for try to help me,
but your answer 1,3 not working on service opertion workspace,
and 2 is not work on change option.
i need its work on service opertion workspae when the field changes.
you maybe know how to do this?