Skip to main content
May 8, 2020 12:53 AM UTC
Solved

selected row remove on infotable

I wanna remove selected row  on infotable. 

The delete query inputs the info table and query. so I made Service to bring property into the infotable.

And I used eqfilter was used to select the value in the infotable.

 

 

ex) getService : A service that brings property into the infotable.

      primary_field : A field I wanna delete 

      1 : selected row on primary_field value

 

var tray = me.getSevice({
thingName: thingName 
});

 

var traydelete = {
fieldName: "primary_field " ,
isCaseSensitive: undefined,
t: tray,
value: "1"  
};

var td = Resources["InfoTableFunctions"].EQFilter(traydelete);

 

var params = {
t: tray, /* infotable */
query: traydelete /* query */
};


var result = Resources["InfoTableFunctions"].DeleteQuery(params);

 

 

but I get Output : Wrapped java.lang.NullPointerException

Infotable, there is a "primary_field" and values "1"

 

Somebody help me! Or tell me how to delete another one.

Would it be ok, tell me how to update that selected row.

Thank you!

 

 

 

May 10, 2020 11:33 AM UTC

Hello @JackEom,

 

Try this:

tray.Delete({ primary_field: "1" });

 

Regards,
Constantine 

2 replies

May 8, 2020 7:56 AM UTC

Didn't go through the entire code but there seems to be a typo(a missing 'r')

 

var tray = me.getSevice({

May 10, 2020 11:33 AM UTC

Hello @JackEom,

 

Try this:

tray.Delete({ primary_field: "1" });

 

Regards,
Constantine