Skip to main content

Search

How to extract the Email, Login name and Title (i.e. name of the person) from a person field using lookup?

Answered

Comments

3 comments

  • Matthias_Walter

    Hi Sid Raj,

    yes you can get the email and the title using functions like this:

    [[@Actions.Loop_apply_to_each_approver.CurrentItem]].Approver.get_email()
    [[@Actions.Loop_apply_to_each_approver.CurrentItem]].Approver.get_lookupValue()

    or the ID (since a person field is a lookup technically) [[@Actions.Loop_apply_to_each_approver.CurrentItem]].Approver.get_lookupId()

    The person field (Approver) is returned as a SP.FieldUserValue which has those functions.

    You can also check this in the Browser Console (F12) by stopping at a debugger point somewhere in your actions/expressions using function expression:

     

     

    Kind regards

    Matthias

    0
  • Sid Raj

    Thanks Matthias. This worked for me.

    I was actually trying to present this information via the "Show message" action. In order to do this, I had to create a variable, add and evaluate the expression (as provided above) and then embed the variable within the "Show message" action. Overall this worked out for me. Thanks so much.

    0
  • Matthias_Walter

    The problem with the Show message action is, that it converts everything into a string, where you will not have these details about the object.

    BR Matthias

    0

Please sign in to leave a comment.