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

Populate Edit Form from DataSourceA save to DataSourceB

I have an app that uses a SharePoint list DataSourceA.  From Gallery it goes to detail screen. 

 

I need to have a second detail screen that shows only LastName and FirstName from DataSourceA but also had other datacards that connect to DataSourceB (also a Sharepoint list) and when the the user clicks the checkmark to save, all data from edit screen goes to DataBaseB.

 

Anybody?  Bueller?

1 REPLY 1
mr-dang
Level 10

Re: Populate Edit Form from DataSourceA save to DataSourceB

Hi @akmiecik,

It sounds like you have two datasources on SharePoint:

  • DataSourceA: has LastName and FirstName that is also used for writing data in B
  • DataSourceB: needs LastName and FirstName from whatever is selected from A

Here's the progression of your app as I inferred:

  1. User selects a record from a Gallery that is bound to DataSourceA. 
  2. The selected record provides the LastName and FirstName to an EditForm that is bound to DataSourceB
  3. User writes data to DataSourceB with the respective LastName and FirstName

The underlying principle to learn here is learning how to reference the selected record in a gallery.

In your Form for B, go to the DataCard where you want the FirstName. In its Default property, set it to

 

Gallery.Selected.FirstName

It will automatically retrieve the FirstName that's selected in the Gallery.

 

You can use a condition to only show this name automatically if the form is in edit mode--since you probably want this field blank if the form is in NewForm mode.

 

If(Form.Mode=FormMode.Edit,Gallery.Selected.FirstName,"")

 

Repeat this for the LastName column. And revise it if you wanted the opposite to occur for Edit and New modes.

 

Let me know if this was helpful with a thumbs up.

 

Mr. Dang

_______

Microsoft Employee
@8bitclassroom

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,225)