How to make it visible choices based on class
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-02-2023 03:45 AM
Hello Experts,
I have created ABC field(dropdown field) in cmdb table.
For ABC field i have created 5 choices
1.A
2.B
3.C
4.D
5.E
then i added ABC field on form in 4 different class example (windows,linux,unix,aix)
Now my requirement is
In windows form for ABC field i want to display only A choice in dropdown
In Linux form for ABC field i want to display only B choice in dropdown
In Unix form for ABC field i want to display only C and D choice in dropdown
In AIX form for ABC field i want to display only E choice in dropdown
How to achieve this
Thanks in advance
Best regards
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-02-2023 04:01 AM
Hi @raj149 ,
Create a onload Client Script on cmdb_ci table, in the script section based on the CI class you can use g_form.removeOption() function to remove the options based on the CI class.
I hope it helps !
āļø Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-02-2023 04:03 AM
Hello @Sohail Khilji
Thanks for your help i am still learner
Could you please help me with script
Best Regards,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-02-2023 04:38 AM
Each CI class is a different table.
I think the best is this case is to configure a dedicate choice for each table instead.
O Abreu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-02-2023 04:41 AM
Hello @Breno Abreu
Yes you are correct each CI class is having different tables.
But you can check 80% of fields is created in top level means cmdb_ci table.