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 / How to populate an Edi...
Power Apps
Unanswered

How to populate an Edit form with a record from SQL Server table based on pk passed from combobox.

(0) ShareShare
ReportReport
Posted on by 19

Hi there. Brand new to PowerApps. I come from an old VBA and C# background.
I have a combobox on a screen and it lives outside of the boundary of the Edit form on the same screen. The combobox contains the names and PKs of IT systems. When the user selects a system name from the combo I want to pass the system pk to the edit form to populate the form with data from just the selected system.

I have the edit form's DataSource set to a SQL Server table (I have the gateway and connection set up properly). How can I inform the Edit form to load using the pk from the combo? I know I can capture the selected pk by referencing the combo.SelectedItems and the pk column name. That's as far as I have been able to go.

Most of my searching has led me down incorrect paths so far. Thanks.


Categories:
I have the same question (0)
  • narayan225 Profile Picture
    2,547 Moderator on at

    @KurtWimberger 

     

    You can use the following formula to lookup your records and display it in the form.

    LookUp(table,ComboBox1_1.Selected.pk= pkcolumn)

    I don't know your data schema, so you will need to adapt this formula to suit you.

     

    Cheers!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard