Skip to main content
1-Visitor
May 8, 2020
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!

 

 

 

18-Opal
May 10, 2020

Hello @JackEom,

 

Try this:

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

 

Regards,
Constantine 

2 replies

16-Pearl
May 8, 2020

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

 

var tray = me.getSevice({

Translate
18-Opal
May 10, 2020

Hello @JackEom,

 

Try this:

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

 

Regards,
Constantine 

Translate