- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I wanted to know how I can make the Pending state appear only on a specific item without showing up on the others. Is that possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can create an onLoad Client Script on whatever table you're referring to:
function onLoad() {
if (g_form.getValue('cat_item') == '<sys_id of specific catalog item>') {
g_form.removeOption('state', -5);
}
}
Where cate_item is the name of the field that determines the 'specific item', and -5 is the value of the Pending choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can create an onLoad Client Script on whatever table you're referring to:
function onLoad() {
if (g_form.getValue('cat_item') == '<sys_id of specific catalog item>') {
g_form.removeOption('state', -5);
}
}
Where cate_item is the name of the field that determines the 'specific item', and -5 is the value of the Pending choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Brad Bowman ,
I'm little bit confused here , as per question he want to show pending state on specific item except other item so code should be ?
function onLoad() {
if (g_form.getValue('cat_item') != '<sys_id of specific catalog item>') {
g_form.removeOption('state', -5);
}Can you please confirm this ?
Thanks ,
Aditya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Yeah, I read it wrong - focused on the vagueness of the details provided, so != is what I meant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @LarissaR4486026 @Brad Bowman
If i am not wrong,they want to make a field appear only in specific catalog item. But, you add remove option
g_form.addOption('state', '5', '5 - Pending approval');

