Skip to main content
5-Regular Member
February 15, 2018
Solved

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

  • February 15, 2018
  • 2 replies
  • 5345 views

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

Best answer by CarlesColl

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;

2 replies

1-Visitor
February 15, 2018

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.

 

 

liliu5-Regular MemberAuthor
5-Regular Member
February 20, 2018

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

1-Visitor
February 20, 2018

But what you are trying to query for?

5-Regular Member
April 6, 2018

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