- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 10:46 AM
I'm working on a form on the Incident table and I need to hide a value from the a dropdown field. I have a reference field on the form from the CI table called Operational Status. Operational Status is an integer field with choices, one of which is "retired". When selecting an option in the Operational Status field on the Incident form, I need to remove the option to select "retired". How would I go about this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 03:35 AM
You can use Client Script for this.
Script:
function onLoad() {
var operationalStatusField = g_form.getField('operational_status');
if (operationalStatusField) {
var options = g_form.getOptions('operational_status');
for (var i = 0; i < options.length; i++) {
if (options[i].text.toLowerCase() == 'retired') {
g_form.removeOption('operational_status', options[i].value);
}
}
}
}
Pease mark this as helpful or correct if this helped you in your problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 11:26 AM
Initially I didn't have the dependent field Install Status from the CI also on the incident form, but once I added that the Configure Choices seems to work - right-click the Operational status field label. You can remove Retired for each Install Status where it appears, and this is only in effect on the Incident form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 02:32 AM
Hello @Jamie Sherry
Here are the steps to hide one of the option from choices:
right click on field label -> select configure dictionary -> Under related list choice section make the retired as inactive true.
Attaching the screenshot for better understanding:
This will hide the choice retired from the dropdown.
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 03:35 AM
You can use Client Script for this.
Script:
function onLoad() {
var operationalStatusField = g_form.getField('operational_status');
if (operationalStatusField) {
var options = g_form.getOptions('operational_status');
for (var i = 0; i < options.length; i++) {
if (options[i].text.toLowerCase() == 'retired') {
g_form.removeOption('operational_status', options[i].value);
}
}
}
}
Pease mark this as helpful or correct if this helped you in your problem.