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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

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

ehalvordsson
12-Amethyst

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

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

2 REPLIES 2

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.

mgoel
17-Peridot
(To:CarlesColl)

@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

Announcements

Top Tags