cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wobblybeard
New Member

Text Input to Auto-fill Fields from SharePoint List

Hi there.

 

In short:

I am trying to update an existing form into a Power App to centralize requests. I am looking to have multiple form fields auto-fill data (pulled from a SharePoint list) when the user enters data into a target field. I have been researching how to do this and I am clearly missing something terribly simple.

 

The user enters a number into Field A (manual or dropdown), Fields B, C, D, etc, are autofilled from the corresponding List row entered into Field A.

 

Column types are different. Any advice or direction would be much appreciated.

4 REPLIES 4
zmorek
Super User
Super User

Your basic formula will be something like:

LookUp(ListToLookUpFrom, FieldA.Text=ColumnA, ColumnToReturn)

Depending on column types and data types, that formula will vary. This will help you: Filter, Search, and LookUp functions in Power Apps - Power Apps | Microsoft Docs

Thank you for your reply. That was the first doc I went through.

 

With a little more detail, for testing I have two fields: Station and Facility. I want Facility to load corresponding row data from the Facility column of ListSrc when a user enters a numerical value into Station. I have the following on the Default property of the Facility_DataCard/FacilityInput field. Tested also on the Facility_DataCard itself, but the error persists.:

 

If(Form.Mode = New,
  LookUp(
    ListSrc,
    Station.Text = Station, Facility
  )
)

 

 Issue: Expected Text value.

zmorek
Super User
Super User

Is Facility a choice column? Is Station a number column? If both are true, you might need something like this:

If(Form.Mode = New,
  LookUp(
    ListSrc,
    Value(Station.Text) = Station, Facility.Value
  )
)

 

Apologies, I misspoke in my initial post. I didn't create the initial List and it has a numerous columns, so I'm not partial to changing column formats or settings. The column types vary, but both Station and Facility are single line text. The user input for Station would be a number (123) and Facility would return a string. My thought is that despite Station reading a number, it would still read it as text.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,256)