web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Navigate to another sc...
Power Apps
Answered

Navigate to another screen by lookup column

(0) ShareShare
ReportReport
Posted on by 53

Hi,

 

I have 2 SharePoint lists:

  1. List 1 with a Title column and other columns
  2. List 2 with a Title column and a Lookup column to Title in List 1

I also have 2 screens:

  1. Detailscreen 1 with the columns and values from an item in List 1
  2. Detailscreen 2 with the lookup column in List 2 and a button. When I click on the button, it should navigate to detailscreen 1 with all the values from an item in List 1.

How can I achieve this? I compared the value of the lookup with the title, but how can I pass the value to the Navigate function?

 

Is it also possible to search for text and a person field in 1 searchbox?

 

Thanks!

Categories:
I have the same question (0)
  • vecerpa Profile Picture
    786 on at

    Hi @Gines,

     

    It seems like you are working with generated Forms from SharePoint list.

     

    First of all I would to tell you that lookup columns are not good type of columns to use with PowerApps. PowerApps is working like visualization/input for data from many sources, SharePoint lists for example. And also PowerApps can merge data from separated lists and display them as one item based on some relation (ID). So there is same function like lookup directly in PowerApps.

     

    For example you have one list with "Name", "Surname", "Phone", "Location"

    Second list with "Location Name", "Location Address"

    Location in first list is represented by Location ID - such ID is created by SharePoint itself for each item in list in default. there is no need to manage it anyhow. So you see just IDs of items in Location list. In PowerApp you can display for example in gallery or however you want all informations - Name, Surname, Phone, Location Name, Location Address in one screen. Similar to lookup in SharePoint lost column.

     

    There is no way to put data to Navigate function. There is need to use for example collection, better description here - https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-update-collection. Collection works like internal storage of data for running PowerApp. When PowerApp is closed such data are lost. So when you click on button you can do for example ClearCollect() to gather needed data.

     

    There is possible to look throught other columns in Searchbox, but there is need to change/update its functions.

    P.

  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Gines,

     

    First of all, you need to notice that the Title field in List1 need to have enforced unique value. Otherwise, when you have one value from Lookup column in List 2, it could point to multiple items corresponding in List 1. 

     

    If your Title field in List1 has unique values, then this could be achieved by following below steps:

    1. Create the auto-generated app using List 2 as the connection. 

    2. Insert a new screen, name it "DetailScreen2". In this screen, insert a display form, and set its DataSource property to:

    'List 1'

    Set its Items property to:

    First(Filter('List 1',Title=DataCardValue30.Selected.Value))

     

    Notice that DataCardValue30 is the control name of the Lookup column data card on DetailScreen1.

    Capture.PNG

     

    3. On DetailScreen1, insert a button and set its OnSelect property to:

    Navigate(DetailScreen2,None)

     

    I just tested and this works.

    Capture.PNG

     

     

    About the search box, did you mean search for Gallery control? If so, then notice that Search Function supports only string searches. That means that you can use it with text column, but not with Person and Group column. But you can use Filter / Lookup functions which could work with Person and Group fields. The formula could be something like:

     

    Filter('List 2', StartsWith( Title,TextSearchBox1.Text ) || StartsWith( Person.DisplayName, TextSearchBox1.Text ) )

     

    This filters the 'List 2' data source for records in which either the Title column or the Person column starts with the search string in TextSearchBox1 textinput control. The || operator is true if either StartsWith function is true.

     

    Regards,

    Mona

  • Gines Profile Picture
    53 on at

    Hi @v-monli-msft

     

    Thank you for your answer. The lookup navigation worked as expected! My problem was that I changed the datacard field from "View selection" to "View lookup". The Datacardvalue.selected.value wasn't appearing because of my modification.

     

    Now I need to experiment with the searchbox to search for a string and people field. StartsWith is a good function to experiment, but I also need to search in the middle of a string and not only the start. I will update my post if I find a solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard