cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

selected row remove on infotable

JackEom
14-Alexandrite

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!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @JackEom,

 

Try this:

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

 

Regards,
Constantine 

View solution in original post

2 REPLIES 2

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

 

var tray = me.getSevice({

Hello @JackEom,

 

Try this:

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

 

Regards,
Constantine 

Top Tags