cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Raeville
Level: Powered On

Auto populate form fields from another SharePoint list

 

I created a SharePoint list with two columns - Role (Title) and Person 

 

Role     Person

CIO      Person A

CFO     Person B

CEO     Person C

 

In my PowerApps Form (separate SP list), I would like to populate three fields with the Person above. 

 

Example: 

 

I want to populate the following fields when the form is open :

 

  1. "IT Approval" with Person A
  2. "Finance Approval" with Person B
  3. "Management Approval" with Person C

 

All the fields above are Person field in both SharePoint lists. 

 

How do I set it up so that the above form fields are auto-populated when the form loads. 

 

Thanks. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Auto populate form fields from another SharePoint list

@Raeville

 

Set the defaults property of "IT Approval" to

 

Lookup(SharepointListwithCIOCFOCEOnames, Role="CIO",Person)

 

and similarly for the other roles.

 

Hope this helps!


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Super User
Super User

Re: Auto populate form fields from another SharePoint list

@Raeville

 

Set the defaults property of "IT Approval" to

 

Lookup(SharepointListwithCIOCFOCEOnames, Role="CIO",Person)

 

and similarly for the other roles.

 

Hope this helps!


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Raeville
Level: Powered On

Re: Auto populate form fields from another SharePoint list

HI @ThatAPIGuy

 

When i put the formula in the default property, it worked a treat. However, doing that meana i'm defaulting the data card value to the Lookup value. It is good when i open up a new form, but it will still show up as the default value when i open in edit/view mode. The SharePoint list item will show the correct value, but when clicked into PowerApps, it shows the default value. 

 

I'm doing this on a customised form. 

 

Do you know how i can overcome the value discrepancies?

 

Thanks again. 

skmcken
Level 8

Re: Auto populate form fields from another SharePoint list

Create a ContextVariable on your Button Select for New and Edit e.g.

 

UpdateContext({CustomForm:"New"})
UpdateContext({CustomForm:"Edit"})

 

Then use an If Statement in the Default Propery e.g.

 

If (CustomForm = "New", Lookup....., Blank())

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Top Community Contributors for September  2019

Top Community Contributors for September 2019 🎉🎉

Let's thank our top community contributors

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 387 members 5,778 guests
Please welcome our newest community members: