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

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

SOLVED
Highlighted
Level 8

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

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

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.

2 REPLIES

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

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.

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

@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