Creating / Deleting Model Categories

Albert Chan
Mega Expert

Hello,

I have a request to build some forms based off of the hardware form. I created a model category, but realized that I used the wrong tables to associate to the category. I deleted the category and then when I try to create another one, I get an error indicating that "There is already a category for this CI class" and that it is an invalid insert. At first I went to Product Model > Model Categories to try to change the CI Class and Asset Class, but it didn't appear that I could change it, so I pushed the delete button. Now I cannot find the model category anywhere.

1. If I deleted it incorrectly, how do I find the model category that I want to edit / delete?

2. How do a create another model category with the same name?

Thanks in advance,

Albert

3 REPLIES 3

Michael Fry1
Kilo Patron

Model categories associate CI classes with asset classes. You can't edit them. You could delete them if they aren't associated with any CI's. If you are trying to create one on a table that already exists, you will get that error message. If you deleted it, you can easily recreate it. The name isn't the unique field, it's the CI Class that has to be unique or not used in any other model categories.



So, what is it you are attempting to do?


Michael, so if I understand your comment correctly, are you saying that in order to create a model category, that i need to first create a unique CI class first? What I was trying to say is that I thought I created a model category, then deleted it, but now I cannot create a new one.



What I'm attempting to do is to create some telecom forms that are based off of the hardware asset form. There is a requirement to make the different telecom categories model categories, but since I have not made them before I'm not entirely sure what impact the CI class and the Asset class will have. What brought up the question was that I tried to create one and once I realized that I couldn't change the CI class or Asset class after creation, I deleted it. When I tried to create it again then I got that message, so I thought I may have either not deleted it correctly or something else was created that is preventing me from creating a new model category with the same CI class and Asset class as the one I previously tried creating.



I've had not to create new forms before, just modifying existing forms so I'm not entirely sure how to go about it.



I'm sorry; I'm sure I didn't explain the situation very well or my intent.


You don't have to create a unique CI class, you can use OOB tables.



Example: you want to create a new   model category, 'Telecom' on the cmdb_ci_comm table but you can't because there is already one on that table 'Communicate Device'. You could deleted it and create new on using that table, or you could modify that name, but you can't create a 2nd one on a table that already has a model category define.



As for your problem, double check your table you are trying to use to make sure it's not on another Model Category already. If necessary, open a HI ticket.