SharePoint List show values where list field is selected in lookup column of another list

Gustafson, John 0 Reputation points
2023-11-10T16:02:28.5366667+00:00

Thank You for looking at my post.

Hypothetical situation...imagine a list of reports that include the name and other supplemental information. There is a second list called events that is used for scheduling review of the report...so the primary component is the time. Events has a lookup column where you can select the report from the Report list. The question I am being asked is...In the report list, is there a way to reference records from the events list where the report was selected? You wouldn't be selecting the event item, just reporting related records. I hope that makes sense.

I hope this is a good place to post this question...answers.microsoft.com appears to be down for me to post a question. Any insight or suggestion would be appreciated.

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2023-11-10T16:02:28.5966667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Yes, it is possible to reference records from the events list where the report was selected in the report list using a lookup column. In the report list, you can create a new column of type Lookup and select the events list as the source list. Then, in the additional column settings, you can select the events column that contains the report name as the column to get information from. This will create a lookup column that displays the events where the report was selected.


    References:

    0 comments No comments

  2. Gustafson, John 0 Reputation points
    2023-11-10T16:07:46.31+00:00

    The solution the AI provided is not working (unless I am doing something wrong. The when adding the lookup in the Report list to the Event List...it is presenting the available options in the event list so they can be selected...but what I want is it to report the records that were selected within the Events list.

    0 comments No comments

  3. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2023-11-13T07:21:50.64+00:00

    Hi @Gustafson, John,

    Thank you for posting in this community.

    First of all, I would like to check your question with you first in case I have misunderstood.

    I have created two lists: reports and events. Since I am not sure what record you want to reference from the events list, in my testing I set it to a single line of text. Don't worry if you want to reference a different type than I do (Date or otherwise), this is just an example, and you can specify the type you want to reference later depending on what you actually need.

    User's image

    User's image

    There are three events_record messages about ReportA in the events list, are you trying to add these three records to the Events_Records column of the ReportA row in the reports list? Like down there?

    User's image

    Correct me if I am wrong.

    If I understand correctly, we can create a power automate flow to do this.

    The basic flow of flow: when a new record is created in events list, we synchronize the records in this new record to the Events_Reports column of the corresponding report.

    All right, let's get started.

    1.Log in to Power Apps or open it at Apps:

    User's image

    2.Create> Automated cloud flow>When an item is created. Give this flow a name, it's up to you to customize it. Click Create when you are done.

    User's image

    3.When an item is created: input your site and events list.

    image

    4.Get item: Get the value of the row just created in the events list.

    image (1)

    4.Get items: Filters relevant items in reports list based on the lookup value of the item in the events list you just created.

    Filter Query: your report name (in reports list) eq ' your report lookup name (in events list) Value'

    image (2)

    5.Update item: Updates the values in the reports list.

    Compose Inputs: Current item.

    You can use item()? ['columnName'] to get the value of the columnName column of the current item. Columns that don't need to be changed use these formulas to keep the value the same.

    Here I am using Events_Records to reference the records in the events list in the reports list. Here I am using concat method to add new records to Events_Records column. Here you can customize your references.

    concat(item()?['Events_Records'],' ',outputs('Get_item')?['body/events_record'])

    image (3)

    6.Click save, and when there are no problems, you can create a new item in the events list to test the flow.

    If you are not familiar with Power Automate and have any questions about the creation process, please let me know the steps and questions you don't understand, and we'll do our best to help you.


    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.