
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 07:30 AM
Hi,
I've 2 tables in cmdb. cmdb_ci_ec2_instance and cmdb_ci_aws_account.
In the form of one record available in 'cmdb_ci_ec2_instance' table, there is a reference field which is a record from 'cmdb_ci_aws_account'. Please find a sample screenshot as below -
In the 'cmdb_rel_ci' table, I've created a relationship between above tables as 'Depends On::Used By'. where 'cmdb_ci_ec2_instance' is a parent table of 'cmdb_ci_aws_account'.
Now, my requirement is whenever, the Install Status of any record from 'cmdb_ci_ec2_instance' changes to 'Installed', then automatically the relationship should get created to the AWS Cloud account which is mentioned in the reference field of that form.
And, whenever the Install Status of the any record from 'cmdb_ci_ec2_instance' changes to 'Disposed', then automatically the relationship should get removed from that AWS Cloud account which is mentioned in the reference field of that form.
How to get this done?
Any help ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 06:50 AM
Hi @Bert_c1 ,
Below is the updated BR -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 12:25 PM
I don't know what happened to my previous post. But
I see the correct table name: cmdb_rel_ci. Your script looks good, you should close this thread now.