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

Multi-Datasource navigation between forms

Hi all, I am using Sharepoint list and I have: • FormA connected to Datasource A showing a personnel basic information • FormB connected to Datasource B showing a personnel's leave record Datasource A and Datasource B connected to each other by a lookup column called "ID" I created ButtonA to navigate from FormA to FormB and I would like FormB to create/display personnel's leave record using the looked up ID. Could you guys help me out ? I am sorry that I could not clearly explaining the issues, so should you have any further questions, please do ask me!
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Multi-Datasource navigation between forms

Hi Than, Normally there would be a gallery screen where you would choose a particular individual. Then you would navigate from there to FormA. The Datasource would be the same as the gallery, say DS1 and the Item property of the form would be Gallery1.Selected. However, If you are using a different datasource, in the form than in the gallery, say DS2, you would use a Lookup() in the form's Item property, ie. Lookup(DS2,ID=Gallery1.Selected.ID). In each instance where a different datasource is used for a form, the datasource in the form and the datasource in the Lookup() would have to be the same. If you were starting with a Form rather than a gallery, you would use the Set() function to create a global variable from the ID in FormA the first time that you navigated to another form. If the ID was held in the DataCardValue control, say DataCardValue1 on FormA then the OnSelect property of the button would be Navigate(FormB,None);Set(gvar,DataCardValue1.Value). Then the Item property for any other forms would be Lookup(DSx, ID=gvar)
2 REPLIES 2
Super User
Super User

Re: Multi-Datasource navigation between forms

Hi Than, Normally there would be a gallery screen where you would choose a particular individual. Then you would navigate from there to FormA. The Datasource would be the same as the gallery, say DS1 and the Item property of the form would be Gallery1.Selected. However, If you are using a different datasource, in the form than in the gallery, say DS2, you would use a Lookup() in the form's Item property, ie. Lookup(DS2,ID=Gallery1.Selected.ID). In each instance where a different datasource is used for a form, the datasource in the form and the datasource in the Lookup() would have to be the same. If you were starting with a Form rather than a gallery, you would use the Set() function to create a global variable from the ID in FormA the first time that you navigated to another form. If the ID was held in the DataCardValue control, say DataCardValue1 on FormA then the OnSelect property of the button would be Navigate(FormB,None);Set(gvar,DataCardValue1.Value). Then the Item property for any other forms would be Lookup(DSx, ID=gvar)
ThaiAn_Vu
Level: Powered On

Re: Multi-Datasource navigation between forms

It worked well, thank you very very very much!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 267 members 4,399 guests
Please welcome our newest community members: