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

Does anyone know how to use Resources["SearchFunctions"].SearchPeople in ThingWorx?

liliu
6-Contributor

Does anyone know how to use Resources["SearchFunctions"].SearchPeople in ThingWorx?

Does anyone know how to use Resources["SearchFunctions"].SearchPeople in ThingWorx?

1 ACCEPTED SOLUTION

Accepted Solutions

var params = {
maxItems: undefined /* NUMBER */,
searchExpression: "El*",
modelTags: undefined /* TAGS */,
query: undefined /* QUERY */,
aspects: undefined /* JSON */,
excludedAspects: undefined /* JSON */,
maxSearchItems: undefined /* NUMBER */
};

// result: INFOTABLE dataShape: SearchResults
var result = Resources["SearchFunctions"].SearchPeople(params).peopleResults;

View solution in original post

6 REPLIES 6

What does you mean on how it works?

 

You have a snippet to use it, just on the snippets write SeachPeople and it will pop the SearchPeople snippet if you mouse over you have an explanation of each parameter.

 

 

liliu
6-Contributor
(To:CarlesColl)

Hi Carles,

 

I know this function can be copied from snippets. However, I don't know how to set the parameters for this function.

 

var params = {
maxItems: undefined /* NUMBER */,
searchExpression: undefined /* STRING */,
modelTags: undefined /* TAGS */,
query: undefined /* QUERY */,
aspects: undefined /* JSON */,
excludedAspects: undefined /* JSON */,
maxSearchItems: undefined /* NUMBER */
};

// result: INFOTABLE dataShape: SearchResults
var result = Resources["SearchFunctions"].SearchPeople(params);

 

Since I don't know it's searching result, I don't know how to set the parameters.

Could you please give me a sample?

 

Best Regards,

Olivia

But what you are trying to query for?

liliu
6-Contributor
(To:CarlesColl)

Hi Carles,

 

Like username started with "El"

 

Best Regards,

Olivia

var params = {
maxItems: undefined /* NUMBER */,
searchExpression: "El*",
modelTags: undefined /* TAGS */,
query: undefined /* QUERY */,
aspects: undefined /* JSON */,
excludedAspects: undefined /* JSON */,
maxSearchItems: undefined /* NUMBER */
};

// result: INFOTABLE dataShape: SearchResults
var result = Resources["SearchFunctions"].SearchPeople(params).peopleResults;

View solution in original post

Leigh
Community Manager
(To:liliu)

Hi @liliu

Just wanted to follow up to see if Carles's response answered your question.  If so, please indicate Accepted Solution for the rest of the Community's benefit.  If not, please advise on current status.

Thanks!

Leigh

Announcements