- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 12:06 AM
Hello Team!
I need your opinion on a small developing fix I'm trying to implement.
I have a Catalog Form that has two Variables that are reference type.
"Database Instances" Referencing the cmdb_ci_db_instances table
"Database Name" Referencing the cmdb_ci_db_catalog table.
I want to implement a reference qualifier on the Database Name variable that will filter the options based on the Database Instance that would be selected.
Example.
Database Instances -> PRD002
Database Name -> List is filtered to only show: CSB, CSB2005, HANGFIRE etc.
That have PRD002 as the database instance.
The cmdb_ci_db_catalog table has the database instance field referenced to the cmdb_ci_db_instance.name field.
Any help would be really apriciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 12:44 AM
Hi @Stergios Stergi ,
In the "Type Specifications" tab of variable "Database Name" select "Advanced" from "Use Reference Qualifier" field and try the below code -
javascript:'name='+current.variables.VariableNameOfDatabaseInstance
Note:
Replace "name" with the field name of "Database Instances" present on "cmdb_ci_db_catalog" which is referencing to "cmdb_ci_db_instances" table.
Replace "VariableNameOfDatabaseInstance" with the name of the variable "Database Instances" present on catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 12:44 AM
Hi @Stergios Stergi ,
In the "Type Specifications" tab of variable "Database Name" select "Advanced" from "Use Reference Qualifier" field and try the below code -
javascript:'name='+current.variables.VariableNameOfDatabaseInstance
Note:
Replace "name" with the field name of "Database Instances" present on "cmdb_ci_db_catalog" which is referencing to "cmdb_ci_db_instances" table.
Replace "VariableNameOfDatabaseInstance" with the name of the variable "Database Instances" present on catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 12:59 AM
Hi @Anirudh Pathak
Thank you very much!
The script I used that workedQ
javascript:;'database_instance='+current.variables.database_instance
I had to change the&colon to a simple :
Thanx once more!