Skip to main content
5-Regular Member
Feb 15, 2018 2:40 AM UTC
Solved

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

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

1-Visitor
Mar 14, 2018 9:41 AM UTC

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;

6 replies

1-Visitor
Feb 15, 2018 8:21 AM UTC

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.

 

 

Translate
liliu5-Regular MemberAuthor
5-Regular Member
Feb 20, 2018 1:25 AM UTC

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

Translate
1-Visitor
Feb 20, 2018 8:00 AM UTC

But what you are trying to query for?

Translate
Emeritus
Apr 6, 2018 4:19 PM UTC

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

Translate