Skip to main content
1-Visitor
August 28, 2018
Solved

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

  • August 28, 2018
  • 1 reply
  • 1785 views

Hi Carles,

Thanks! How should the JSON inputs be formatted? Is there any documentation available for that? 
For example, I am trying to use SearchThings and use the ThingTemplate filter.


Best regards Erik

 

Related to previous post

Best answer by CarlesColl

Hello Erik,

 

For instance if you want to recover System Users you can use "aspects" parameter do as follows:

 

 

var result = Resources["SearchFunctions"].SearchPeople({
	maxItems: undefined /* NUMBER */,
	searchExpression: undefined,//"wup*",
	modelTags: undefined /* TAGS */,
	query: undefined /* QUERY */,
	aspects: { isSystemObject: true },
	excludedAspects: undefined /* JSON */,
	maxSearchItems: undefined /* NUMBER */
}).peopleResults;

That's the only that I know and I've used.

aspects -> Aspects to match

excludeAspects -> Aspects to exclude? doesn't seem to be the inverse of aspects...

 

If you look at DataShape SpotlightSearch you have more fields that seems aspects, but I didn't tried it:

  • isEditable
  • isEditableExtensionObject
  • isEditableSystemObject
  • isExtension

Regards,

Carles.

1 reply

1-Visitor
November 28, 2018

Hello Erik,

 

For instance if you want to recover System Users you can use "aspects" parameter do as follows:

 

 

var result = Resources["SearchFunctions"].SearchPeople({
	maxItems: undefined /* NUMBER */,
	searchExpression: undefined,//"wup*",
	modelTags: undefined /* TAGS */,
	query: undefined /* QUERY */,
	aspects: { isSystemObject: true },
	excludedAspects: undefined /* JSON */,
	maxSearchItems: undefined /* NUMBER */
}).peopleResults;

That's the only that I know and I've used.

aspects -> Aspects to match

excludeAspects -> Aspects to exclude? doesn't seem to be the inverse of aspects...

 

If you look at DataShape SpotlightSearch you have more fields that seems aspects, but I didn't tried it:

  • isEditable
  • isEditableExtensionObject
  • isEditableSystemObject
  • isExtension

Regards,

Carles.

5-Regular Member
December 5, 2018

@ehalvordsson

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark @CarlesColl answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel