CI Class automation

Alex153
Tera Contributor

Hi guys,

Is it possible to automate CI Class creation? For example I want to create 20 CI Classes and have different attributes in each class. Maybe via XML file? Or is there another way?

1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Hi @Alex 

Why do you want to go that path of doing something which I believe will be risky and tricky both?

I understand the intent can be here to save time as you need to create 20 classes, but from my personal experience in project I would strongly suggest to create it manually and loading of data you can automate the way you want.

Just to be aware based on what attributes your classes are supposed to have may be you can create a Parent class and then keep on extending the child classes when you create from that particular Parent class.

This will save time and you do not have to create field manually and creation of Table(class) will not take more than few minutes.

For example: Look at the parent class as Hardware and computer being Child . So similarly you can create your child classes and extend from a parent class.

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

17 REPLIES 17

shloke04
Kilo Patron

Hi @Alex 

Why do you want to go that path of doing something which I believe will be risky and tricky both?

I understand the intent can be here to save time as you need to create 20 classes, but from my personal experience in project I would strongly suggest to create it manually and loading of data you can automate the way you want.

Just to be aware based on what attributes your classes are supposed to have may be you can create a Parent class and then keep on extending the child classes when you create from that particular Parent class.

This will save time and you do not have to create field manually and creation of Table(class) will not take more than few minutes.

For example: Look at the parent class as Hardware and computer being Child . So similarly you can create your child classes and extend from a parent class.

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Alex153
Tera Contributor

Hi Shloke,

I think that is a good idea. I tested. But there is something wrong. CIs are created but not sub class

find_real_file.png

Need something like here

find_real_file.png

Couple of things Alex you need to consider before progressing on this requirement:

1) First the Table which is your Parent , please make sure the "Extensible" flag on the parent table should be marked as True as shown below:

Navigate to the Parent table and open the record  and make sure Extensible is check as True first:

find_real_file.png

Now in order to create a Sub Class Navigate to CI Class manager module as shown below:

find_real_file.png

Search for your parent class like for example I have selected Hardware as my Parent Class. Now hover on your Parent class and on the Right you will see a HAM Burger, click on that HAM Burger and select Add Child class as shown below:

find_real_file.png

find_real_file.png

Now fill out the details to create a child class as shown below:

find_real_file.png

Add your attributes by double click on where it is written as "Insert New Row" and then after adding click on Next:

find_real_file.png

Like this keep on going to next section and finally submit it to create a Subclass which will be shown like below:

find_real_file.png

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Alex153
Tera Contributor

Shloke,

Thanks for quick reply.

Well, I know how to do it manually. I was trying to create child class using import set (from excel file).

Alex153
Tera Contributor

it works a bit strange. Instead of name it uses Label

find_real_file.png