yuuvis® RAD Q&A

0 votes
by (660 points)

Hi OS-Team and Partners,

is it possible to get the loginName of an User which is referenced in a field of Type "ID"?

I already get these information for creator and modifier of an object. (also id, title ... by typing creatorid, creatortitle ...) I am wondering whether this additional user information can be accessed as well in referenced fields...

My request looks like this:
[1]: http://host/search/?size=1000


{{
"types": [                 
"objectTypeX"
],
 "fields":[

"id",
"created",
"creatorid",
"creatortitle",
"creator",
"objectTypeX.userReference",
"objectTypeXuserReference" ...

 "options":{
  	"searchmode":"idxs",
  	"resolvereference":true,   
  }   
}

I already tried things like userReference.name, userReferencename, userReferencetitle and userReference_meta.name ....
i expected an output like dms service, which gives shows the "name" per default as result, but search services gives as result only the "title" of the user Object like "Martin Januschke" instead of the login..

v. 5.20

Would be great if you could give a hint what i'm doing wrong here..

Many Thx in advance
Martin

4 Answers

0 votes
by (1.0k points)

Hi Martin,

In order to deal with users or groups you need to use type 'ORGANIZATION' instead of type 'ID'.
ID-Fields are referencing to dms objects only. If you use 'ORGANIZATION' you'll get
the username (aka loginName) and additional meta data like first and last name.

Best regards,
Anna

0 votes
by (660 points)

Hi Anna,

many thx... but i already did the classification for "Organization".. (please see the screenshot below). I only can define "ORG: User/Group" if i select datatype "ID"...
I guess that the system is properly referencing to the orgObject (User) cause i get the "Usertitle" back in an search request and in via dms service i get the correct names (loginNames).. this is what i would also expect as response in a search service..

Are there any other options to get these information?

Many Thx & best regards
Martin

by (660 points)
if you search via elastic api (http://localhost:9200/enaiored_0/_search) you will get the objectTypeX.userReference correctly (loginName) as well as all other fields like objectTypeX.userReferenceorgobjectid, objectTypeX.userReferenceorgobjecttitle...
but i cannot get these fields in yuuvis search response...
0 votes
by (660 points)

Hi OS TEAM & Community,

is there any Update on this Topic?

Many Thanks & Regards
Martin

0 votes
by (1.2k points)

Hi Martin,

the option that you need is called „resolveReference“.

"options":{
"resolveReference":true
}

Best regards
Irina

...