How to Show table row that is only present on another Table

Hi Team,

Good Day !

I have two tables one is Product table with ProductId and the other one is  ProgramProducts table with column ProgramId, ProductId, ProgramProductId.

ProgramProductIdProgramIdProductId
1181

 

ProductIdProductNameProductDesc
1Blah foodBlah Blah

I wanted to show Products that are in the ProgramId = 18 however I don't know how to some kind of leftjoin and filter out. What I did is I use security option on table and filter out to show rows in ProgramProducts with ProgramId = 18 but what I need to achieved is filter out the Products as well to show only the products that is under ProgramId = 18.  I already changed the ProductId to reference on Table ProgramProducts (ProductId). Do you have any Idea how can I achieve this?

Thanks in Advance 

0 4 136
4 REPLIES 4

It's not entirely unclear what you're trying to accomplish and, therefore, whether security filters are the best way to do it. Assuming that the security filter for the Products table is indeed what you should use, consider one of these techniques.

If your tables are related in what I infer from your description would be the standard way, try:

IN(18, [Related ProgramProducts][ProgramID])

If your reference between tables is the reverse, try:

[ProductID].[ProgramID] = 18

 

Hi @dbaum  

Good Day !

Thank you for response I have tried your suggestion in security filter of Products table however it seems that it is throwing some error that says that it can't be filter by non physical column 

To clarify what is my goal I have this SQL representation of what I'm trying to achieve

SELECT * FROM PRODUCTS p LEFT OUTER JOIN PROGRAMPRODUCTS pp ON p.ProductID = pp.ProductID WHERE pp.ProgramId = 18;

Is this possible to achieve or maybe adding the column FormspaceId List will do?

ProductIdProductNameProductDescProgramId List
1Blah productblah blah Product18,41

Thanks in advance

I still don't understand your goal. I suggest post screenshots from the AppSheet editor showing the columns for each of the tables you mention.

Steve
Platinum 4
Platinum 4

You'll find us much more helpful if you describe your problem using plain language rather than using SQL--which has nothing to do with AppSheet.

Top Labels in this Space