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

Collection of DataTables

Each screen in my application is a DataTable displaying a different view from a database.

I was hoping to set this up so when a user clicks a row in any of the DataTables, they are taken to a common "View" screen, which populates a Display form with

Item: varDataTable.Selected

Depending on which screen they came from, the source DataTable will be different, so I wanted to pass the clicked DataTable to the View screen in a context variable (so I don't have to have a separate View screen for each DataTable).

Navigate(View,ScreenTransition.None,{varDataTable: datListAll})

This works for one screen, but as soon as I add it to another screen, I get an error that says:

Incompatible type. We can't evaluate your formula because the context variable types are incompatible with the types of values in other places in your app.

Is there a better way to do this?

 

01.pngList All screen - passing the DataTable in a context variable works02.pngManagement screen - context variable does not work03.pngView screen - it doesn't like populating the Item from a variable, I guess

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Collection of DataTables

Set the item property of the of the form to Lookup(datasource,ID=varDataTable.Selected.ID). The datasource of the form must be the same as the datasource of the lookup.

2 REPLIES 2
Super User
Super User

Re: Collection of DataTables

Set the item property of the of the form to Lookup(datasource,ID=varDataTable.Selected.ID). The datasource of the form must be the same as the datasource of the lookup.

Akatamaoka
Level: Powered On

Re: Collection of DataTables

This worked! Thank you!

 

In the data table's column OnSelect I pass the ID variable according to which list is clicked:

Navigate(View,ScreenTransition.None,{varID:datListAll.Selected.HMY})
Navigate(View,ScreenTransition.None,{varID:datManagement.Selected.HMY})

Then on the View screen, on my FormViewer, the Item is set to:

LookUp('[dbo].[MyDataBase]',HMY=varID)

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 23 members 4,246 guests
Please welcome our newest community members: