How to add Source Lookup Values from a People or Groups column to Target List using JSON

Macdonald, Alana 26 Reputation points
2024-08-08T18:27:01.33+00:00

I have a Source list that contains team contact information and a Target list with project taskings.

Source List

Team(single line of text) Manager(person or group) Admin(person or group) text email(single line of text)(JSON formatting below)
TeamA M**e Bb, Ky m***** Email address is removed for privacy ; b** Email address is removed for privacy ; k** Email address is removed for privacy ***

Target List

Project Number(single line of text) Team(lookup) Team: text email(lookup)
A-12345 TeamA m***** Email address is removed for privacy ; b** Email address is removed for privacy ; k** Email address is removed for privacy ***

I want to select a team in the Target list which will add the individual team member emails in a column in the target list (using Lookup). The text email column in the target list will be used to send an email through power automate, triggered when a list item is created.

As I am unable to use a 'Person or Group' column for a Lookup column, in the Source list I used JSON to pull the text email address from two 'Person or Group' columns into one column (single line of text).

{
 
"elmType"
"txtContent"
}

It works, but it does not appear to be selectable text, which I'm assuming is why it doesn't show up in the lookup column in my target list.

Any help would be greatly appreciated!

Microsoft 365 and Office | SharePoint | Development
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2024-08-23T02:15:15.3666667+00:00

    Hi @Macdonald, Alana ,

    Since this thread has been sitting for a while, Do you have any other questions about this thread? If so, feel free to keep posting them here and we'll be happy to help you out.

    I would make a brief summary of this thread:

    Issue Symptom:

    Want to add Source Lookup Values from a People or Groups column to Target List. Using json to display the person column's email is a dummy value for this list view, it's actual value has no stored value. So there is no way we can choose to have the email value in another list look up column.

    Current status:

    Straightforward solutions, Manually typed the emails into my source list (~25 emails).


    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread.

    Your understanding and patience will be highly appreciated! Hope you have a good day and keep safe!


    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Macdonald, Alana 26 Reputation points
    2024-08-08T18:29:00.2333333+00:00

    Sorry, code block didn't save.

    {
     
    "elmType"
    "txtContent"
    }
    
    0 comments No comments

  2. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2024-08-09T07:29:11.1366667+00:00

    Hi @Macdonald, Alana ,

    Thank you for posting in this community.

    Using json to display the person column's email is a dummy value for this list view, it's actual value has no stored value. So there is no way we can choose to have the email value in another list look up column.User's image

    1.You can create a Microsoft flow/power automate to update the Email address field based on the Person or Group field to text email column.

    Please refer to:https://tomriha.com/get-items-for-each-user-in-multiple-people-picker-field-power-automate/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Hope the information can help you. Since Power Automate is currently not supported in the Q&A forum, and my knowledge of it is limited, it would be great if this solves your problem. If this doesn't solve your problem, or if you have a more complex problem, it is recommended that you start a new discussion via the Power Automate Community to get more targeted support.

    2.Then creates a list relationship using a lookup column that automatically displays emails based on the Team selected in the Target List: https://support.microsoft.com/en-us/office/create-list-relationships-by-using-lookup-columns-80a3e0a6-8016-41fb-ad09-8bf16d490632


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.