For cmdb_ci_win_server table,we need to map location field based on u_server_room,can any one please suggest sample code for setting the location field value based on u_server_room value.

Naga13
Tera Contributor

Dear Group members,

we have requirement as below,

For cmdb_ci_win_server table,we need to map location field based on u_server_room,can any one please suggest sample code for setting the location field value based on u_server_room value.

Best Regards,

Naga.

1 ACCEPTED SOLUTION

If you want to achieve this whenever the server record is created/updated,

then by this logic location will be same as server room when updated/inserted:-

You need to create a BR on windows table

When to run

find_real_file.png

actions

find_real_file.png

 

Result

find_real_file.png

 

Please mark as correct if its helpful to you

Regards,
Anshu

View solution in original post

8 REPLIES 8

Anshu_Anand_
Kilo Sage
Kilo Sage

is this u_server_room reference field on windows server and what table its referring to?

can you share some details?

 

 

Regards,
Anshu

Thanks for reply Anshu,

It refers to cmn_location table.

 

Best Regards,

Naga.

If you want to achieve this whenever the server record is created/updated,

then by this logic location will be same as server room when updated/inserted:-

You need to create a BR on windows table

When to run

find_real_file.png

actions

find_real_file.png

 

Result

find_real_file.png

 

Please mark as correct if its helpful to you

Regards,
Anshu

Thanks Anshu, i will try it.