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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Is there "Distinct" function in the Infotable services?

YangJaeUng
10-Marble

Is there "Distinct" function in the Infotable services?

I would like to get distinct items from results that are infotable type.

It's similar with "distinct()" of SQL.

Is there anyone know about this as a embedded function of Thingworx?


ACCEPTED SOLUTION

Accepted Solutions

I'm sorry.

I found distinct service in the Infotable function.

Below is my code.

Please refer my code if you have same problem of mine.

============================================================

var params = {

  maxItems: 500 /* INFOTABLE */,

  startDate: undefined /* QUERY */,

    endDate : undefined,

    oldestFirst: false,

};

var result = me.QueryPropertyHistory(params);

var params = {

  t: result,

    columns: "UserID"

};

// result: INFOTABLE dataShape: "undefined"

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

======================================================================

View solution in original post

1 REPLY 1

I'm sorry.

I found distinct service in the Infotable function.

Below is my code.

Please refer my code if you have same problem of mine.

============================================================

var params = {

  maxItems: 500 /* INFOTABLE */,

  startDate: undefined /* QUERY */,

    endDate : undefined,

    oldestFirst: false,

};

var result = me.QueryPropertyHistory(params);

var params = {

  t: result,

    columns: "UserID"

};

// result: INFOTABLE dataShape: "undefined"

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

======================================================================

Announcements


Top Tags