PnP - Search Results and MGT-People - (1) query several users based on a managed property (RefinableString) - (2) persona card when hovering mouse text #3167
Unanswered
Mr-Matthieu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
Context:
I have set up a staff directory within my organisation using the PnP - Search Results Webpart. I am using the detailed list layout (p.2 of the Webpart panel). The query I am using is fetching data from different lists (contentclass:STS_ListItem*), each of the list corresponding to different service.
The list I am using is set up like this:
I mapped the crawled properties of the two columns (People & Backup) to managed properties (RefinableString) which enables me to retrieve the names of colleagues dealing with a specific file. When using the query I get the different names affected to a specific task in one column and their backup in the next one.
Slot name chosen:
RefinableString110 = Person
RefinableString117 = Backup
I tried to do two things:
(1) Adding the following piece of code in the "Use Handlebars expression" located under Layout options> Manage columns (p.2 of the Webpart panel):
< mgt-people people-queries="{{slot item @root.slots.Person}}" ></ mgt-people >
which gives me this:
My aim was to fetch the names "contained" in the managed property and get the profile bubbles corresponding to the names. When only one name is present in the list's column, the bubble appears (Example 1). When several names are detected, the bubble simply does not appear (Example 2).
Issue/question: how to display all the names contained in the orignal list in my PnP Search and Results column as small size bubbles like this?:
https://mgt.dev/?path=/story/components-mgt-people-properties--user-ids&source=docs
(2) I searched how to be able to have the persona card displayed when hovering the mouse hover the names but did not find how to do this:
I first try to work around the different settings provided in the Microsoft graph toolkit playground (https://github.com/microsoftgraph/microsoft-graph-toolkit) but I noticed the disable fetch image does not seem to exist for mgt-people and that no one tried to include persona bubbles within a list.
If you have a clever way to do this please let me know :-). If something is not clear, just tell me and I will try to provide more details. Thanks a lot for your support,
Matthieu
Beta Was this translation helpful? Give feedback.
All reactions