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

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.

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.

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.

Community Support Team _ Jeffer Ni

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

PowerApps11
Helper IV
Helper IV

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,626)