- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 02:14 AM
Hi All,
We have change table in that we have two fields ."ci "is reference field(cmdb_ci) and "type" is string with four values(standard,comprehensive,stable and delay)
,now we have a requirement that when ever type of ci is corporate then only then only in the "type "field we need to get the option "stable"other wise "type"field should populate only three dropdown values.
Warm Regards
Govardhan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 04:22 AM
Hi,
Go to UI policy and select
condition: configuration item is corporate
in advance mode
run script this
if true
g_form.setValue('your field name','stable);
g_form.removeOption('your_field_name, 'value of standard');//add choices as per requirement
g_form.removeOption('your_field_name, 'value of ,comprehensive' )
g_form.removeOption('your_field_name, 'value of delay')
if false
g_form.removeOption('your_field_name','value of stable');
value of choice get by right click on choice and click on Show Choice list.
Mark as: LIKE/Correct/Helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 03:41 AM
Hi,
I have given != (not equal to) operator in the if statement, which means if the ci is not corporate then only it will remove the option stable, otherwise it will show it. Also, in place of 'corporate' you need to specify the sys_id of corporate ci.
Regards,
Prajakta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 02:11 AM
Thank you for the reply ,
corporate is not ci ,but it is type of ci,if i have ci type as corporate then i have to get the stable option in the "type"field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 04:22 AM
Hi,
Go to UI policy and select
condition: configuration item is corporate
in advance mode
run script this
if true
g_form.setValue('your field name','stable);
g_form.removeOption('your_field_name, 'value of standard');//add choices as per requirement
g_form.removeOption('your_field_name, 'value of ,comprehensive' )
g_form.removeOption('your_field_name, 'value of delay')
if false
g_form.removeOption('your_field_name','value of stable');
value of choice get by right click on choice and click on Show Choice list.
Mark as: LIKE/Correct/Helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 08:20 PM
Pls mark as helpful if you think so
;-)kirtesh