8
Views
2
Comments
Solved
Reactive - Display table data from foreign key
Question

This should be a pretty easy one but for some reason I can't figure it out


I have a table that has a foreign key to a master table. I want to display to the user the contents of the table including data that exists on the master table. How do I do this? In traditional development I would use a lambda expression of something like

TABLEB.Where(X=> x.Id = TABLEA.ForeignKeyId)

Rank: #68
Solution

Hi Josh,


You need to have the tables in your data model, example:



And now on the screen you have a query and you have the joins by the foreign key:

The with or without represents a LEFT JOIN in SQL.

And on the UI part of the screen you add a list, bind it to the table and add content to it:


In my case I have a list item with an expression, coming from the query:



Hope it helps.


Cheers,

João

Rank: #1981

Ah, I knew it was going to be something dumb that I just wasn't thinking about. Thanks