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 / Filling form fields ba...
Power Apps
Answered

Filling form fields based on specific record in data source

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am looking to bring information from a third party system (assume a Data Source already connected to the app) and fill in fields based on a user's input.

 

As an example, the user may enter a username into a text box and click on a button, that will then pull the user's details from the data source and populate the Phone Number and Email Address text boxes. The user can then change those fields if they wish.

 

I am trying to make this work with a combination of collections, context variables etc with the value stored in the "Default" field of the text box (and using Reset when the user changes the username), but finding this quite challenging. Is there a better way of doing this?

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I suggest you to change these fields by EditForm rather than custom text box, then there is no need to worry about Default property.

    1. Use LookUp function to retrieve back the record from the data source

    Button.OnSelect: Set(SelectedItem, LookUp('Data Source',username=TextInput1.Text));EditForm(FormName)

    2. Bind the Form to the SelectedItem

    Form.Item: SelectedItem

    3. Add a SubmitButton, set OnSelect: SubmitForm(FormName)

     

    Hope this helps,

    Sik

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard