NetXMS Support Forum

English Support => General Support => Topic started by: knut4linux on December 05, 2018, 02:45:41 PM

Title: DCI Table Transformation not working
Post by: knut4linux on December 05, 2018, 02:45:41 PM
Hi @ll,

i try to transform some dci-vlaues, but it does not work for me.


conStat = $1->getColumnIndex("TCPConState");
switch (conStat)
{
case "2":
   return "listen";
     break;
case "5":
   return "established";
     break;
case "11":
   return "waiting";
     break;
default:
   return "unknown";     
}


Whe i try this script for a single dci value ($1) it works.

No Error occurs after applying. I dont know whats wrong  :-\

Thx to @ll for help
Title: Re: DCI Table Transformation not working
Post by: Tursiops on December 07, 2018, 05:30:10 AM
Hi,

Tables are a bit different. Your script is effectively replacing the entire table with one single value.

The following post might help you get this working:
https://www.netxms.org/forum/configuration/transformations-scripts-for-table-dci/

Cheers
Title: Re: DCI Table Transformation not working
Post by: knut4linux on December 07, 2018, 08:22:44 AM
Hi Tursiops,

thanks for your help. I know this post but misunderstod.

>> Your script is effectively replacing the entire table with one single value

This was the decisive note to understand.

Many Thanks for you  ;)

How i can mark as solved?
Title: Re: DCI Table Transformation not working
Post by: Tursiops on December 08, 2018, 01:50:36 PM
Hi,

In the bottom left you should see a few buttons (for any topics started by you): Remove Topic, Lock Topic and Topic Solved.

Cheers
Title: Re: DCI Table Transformation not working
Post by: knut4linux on December 13, 2018, 07:41:22 AM
Thx Tursiops and merry christmas  8)