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

Gallery to show multiple tables

Is it possible to have your main gallery show multiple linked fields from 3 tables

 

EG - show field 1 from another tabled based on unique key?

 

J

2 ACCEPTED SOLUTIONS

Accepted Solutions
h-nagao
Level 10

Re: Gallery to show multiple tables

It’s not directly answer for your question, because I have to check “where xxx is latest” is correctly work, but if you want to select latest record, it is better to use SortByColumns function;
LookUp(SortByColumns(datasource, “sysdate”, Descending), MilestoneID=....)

View solution in original post

h-nagao
Level 10

Re: Gallery to show multiple tables

You seems to have multiple topics, so lets discuss about form on appropriate topic 🙂

View solution in original post

19 REPLIES 19
h-nagao
Level 10

Re: Gallery to show multiple tables

Hi,
It is possible to display fields from another tables, if there exists unique key.

1. Define 2 tables (ex: table1 , table2)
2. Set Items property of Gallery as table1
(assuming “unique key” is unique in table1)
3. Add label to Gallery and set text property as
LookUp(table2, <unique key field in table2>= ThisItem.<unique key name>, <return field name in table2>)

Thanks,
jesenavaranjan
Level: Powered On

Re: Gallery to show multiple tables

Thank you!  This is great, however I can't get it to work:

Is my syntax okay below?

This is for the Text property of the label (tbDeliveryInfo is the table 2)

LookUp('[dbo].[tbDeliveryInfo]',<ID>=ThisItem.<ID>,<DeliveryInfoID>)

I am getting the error 'Expected Operator'

 

Jese

h-nagao
Level 10

Re: Gallery to show multiple tables

Hi Jese,
I think syntax is okay...
To figure out cause of error, could you attach screenshot of error and give a bit detail of your table?

Thanks,

jesenavaranjan
Level: Powered On

Re: Gallery to show multiple tables

Heres a screeshot

 

Table1 has 'MilestoneID'

Table 2 had additional info on 'MilestoneID'

 

Thank you

h-nagao
Level 10

Re: Gallery to show multiple tables

Hi Jese, Thank you sharing detail, and I'm sorry my expression is a bit misleading. Please remove <>'s from field name, i.e., Just set Text property as LookUp('[dbo].[tbMilestoneDeliveryInfo]' , MilestoneID = ThisItem.MilestoneID ,MilestoneDeliveryInfoID) Thank you,
mogulman
Level 8

Re: Gallery to show multiple tables

You don't mention the data source but when I need to do this in Gallery I use SQL Server views.  View appears as table.  BTW, VGA stands for View for Gallery.

 

ALTER VIEW [dbo].[MatterVGA]
AS
SELECT        m.MatterID, m.MatterName, s.Stage, m.SettlementDate, cl.ClientName
FROM            dbo.Matter m
    INNER JOIN Client cl ON m.ClientName = cl.ClientID
	INNER JOIN Stage s ON m.Stage = s.StageID
GO
jesenavaranjan
Level: Powered On

Re: Gallery to show multiple tables

Hi

 

My syntax is still returning an error

 

And says 'Invalid Argument Type'

jesenavaranjan
Level: Powered On

Re: Gallery to show multiple tables

I have thought about doing this

But I might have multiple rows in the my table 2 , which I need to call from

I will also consider doing this to see

h-nagao
Level 10

Re: Gallery to show multiple tables

Hi I have checked your error, and you may have also "Name isn't valid...." error on ThisItem.MilestoneID. This error is arise when its name is not correct in data source (Table1). Could you verify field name once again?

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,320)