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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using an Edit form to ...
Power Apps
Answered

Using an Edit form to Update list item using a lookup dropdown

(0) ShareShare
ReportReport
Posted on by 1,360

Hello,
I have a list of items.
When I open the edit form it only displays the first record to edit.
I have a lookup on the form that a user can make a choice of what record to edit.
The issue is that when the user makes a choice from the dropdown/ lookup the form doesnt refresh to that item, it stays on the first record.

golfnutt82_0-1638288298216.png

Above you will see that it displays record 21
The lookup dropdown showing is related to a different record from the list.
Clicking on the selection should update the form to display that records metadata.
The form and the data both use the same list items.

Below is the design view.
Maybe I am going about this in the wrong way?

golfnutt82_0-1638289754656.png

The Text box left of the lookup filters the roles used in the lookup.

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, you need to have the dropdown outside of the form, the when an item is selected, you can set the selected item as a variable and use the variable in the Form Items to update the form

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @golfnutt82 

    A form will only display a single record from a datasource.  You can select the record using a gallery, a datatable or a dropdown box  but it must be outside of the form itself as @C-Papa  says.  The DataSource of the form must be the same as the gallery, datatable or dropdown.  If you are using a dropdown to select the record, then the form should have the Item property like

    Lookup(DataSource, ID = Dropdown1.Selected.ID) 

     

  • golfnutt82 Profile Picture
    1,360 on at

    I need to have the dropdown outside the form? 
    Can you show or explain what that means as I am sort of new at this but getting better every day from people here on the Power Apps forum. 🙂

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @golfnutt82 

    !.jpgThe screenshot shows a dropdown for a sample contact list.  The Items property is shown above the dropdown and the DataSource and Item properties for the form are shown above the form.  The form shows the values for the entire record selected in the dropdown. 

  • golfnutt82 Profile Picture
    1,360 on at

    So the dropdown can still be connected to the datasource outside the form?
    Example of the formula would be helpful!
    Thanks!

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @golfnutt82 

    Yes. Not only can the same datasource in the dropdown be connected, but it must be selected for the form to work right.   The formulas for the connections are shown in red above each control. The Item property of the form has to reference a unique value in the table being referenced by both the dropdown and the form.  In the case of my example, a datasource called accounts is used and the field with a unique value is 'Account Number'.   

    A dropdown control is used to select a single unique record from a datasource.  Any field in the record selected in the dropdown can be referenced even though the window shows only one field.  So the Account Number can be referenced by the form's Item property Lookup(accounts, 'Account Number'= Dropdown1.Selected.'Account Number' ) even though the Account Name is the one shown in the window of the dropdown. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard