Get People-Picker via [[@Web.GetFirstValueForQuery()]]
Hi skybow community,
is it possible to get a people picker field with [[@Web.GetFirstValueForQuery()]]?
Thanks in advance.
Jens
-
Hi Jens Hetze
[[@Web.GetFirstValueForQuery()]] will send the request to the Sharepoint to grab data by your query.
Site Users are stored in a list, the internal name of which is "User Information List" but he is on the root web of a site collection.
So you must use[[@Site.GetFirstValueForQuery()]]
For example:
[[@Site.GetFirstValueForQuery('User Information List', "<Where><Eq><FieldRef Name='ID' /><Value Type='Number'>3</Value></Eq></Where>", 'Title')]]
This will give you the Title of user with ID == 30 -
It is possible to get mail adress from another list and that list is not connected with current list by lookup.
First, the type of expression must be "Assignment".
Then attach to ["$6_2"] to [[@Web.GetFirstValueForQuery()].
For example: [[@Web.GetFirstValueForQuery('ListName', 'CAML-Query','FieldToReturn')]]["$6_2"]
It is also possible to get:
- displayName ["$5o_1"]
- userID ["$1s_1"]
0
Please sign in to leave a comment.
Comments
2 comments