Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Does anyone know how to use Resources["SearchFunctions"].SearchPeople in ThingWorx?
Solved! Go to Solution.
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;
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.
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?
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;
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