cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerApps11
Helper III
Helper III

One form use two datasource

Hi 

 

I have 2 data source SharePoint they both use the same contact list so is there a way I can use it if navigated to the contact list form to show the correct record so I can edited?

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
CNT
Super User
Super User

@PowerApps11 Assuming that by 2 data sources, you mean 2 share point sites with exactly the same List (and columns), you can add both these data sources to the APP and then use an If statement to choose the correct one.

View solution in original post

Hi @PowerApps11 ,

 

One Form can have only one data source, set in DataSource property of the Form. Back to your scenario, since you will always need to modify the contact in the contact list, you should set the DataSource of the EditForm to be Contact list. Then the point is an EditForm will allow you to edit only one record which is set in Item property. So, below would be the detailed steps:

1. Set a variable when navigating from Projects Gallery and Tasks Gallery OnSelect of the Buttons:

Set(varContact, ThisItem.ContactName);Navigate(ContactDetailScreen)

 

2. DataSource of the Contact Edit Form:

ContactList

 

3. Item of the Contact Edit Form:

LookUp(ContactList, ContactName = varContact)

Replace ContactName with the column name in your Contact list.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

6 REPLIES 6
CNT
Super User
Super User

@PowerApps11 Assuming that by 2 data sources, you mean 2 share point sites with exactly the same List (and columns), you can add both these data sources to the APP and then use an If statement to choose the correct one.

View solution in original post

Hi @CNT 

The 2 list is like tasklist and projectlist but they both share on contact name which is coming from contact list all I need is to be able to modify the contact details from both list when I navigate either side to contact list form to be able to modify 

thanks 

@PowerApps11 Is Contact Name in the tasklist and projectlist a lookup column to the Contact List? Can you share some screen shots of the App?

@CNT 

If understood  you what you mean is if I have both list  a lookup column in backend sharepoint? 
the answer is no

 

Hi @PowerApps11 ,

 

One Form can have only one data source, set in DataSource property of the Form. Back to your scenario, since you will always need to modify the contact in the contact list, you should set the DataSource of the EditForm to be Contact list. Then the point is an EditForm will allow you to edit only one record which is set in Item property. So, below would be the detailed steps:

1. Set a variable when navigating from Projects Gallery and Tasks Gallery OnSelect of the Buttons:

Set(varContact, ThisItem.ContactName);Navigate(ContactDetailScreen)

 

2. DataSource of the Contact Edit Form:

ContactList

 

3. Item of the Contact Edit Form:

LookUp(ContactList, ContactName = varContact)

Replace ContactName with the column name in your Contact list.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

PowerApps11
Helper III
Helper III

Hi @CNT  and @v-jefferni 

 

Thanks actually i have used if statement and it worked it is just bit delay showing like 5 second but apart that everything else is working 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,590)