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.
ProgramProductId | ProgramId | ProductId |
1 | 18 | 1 |
ProductId | ProductName | ProductDesc |
1 | Blah food | Blah 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
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?
ProductId | ProductName | ProductDesc | ProgramId List |
1 | Blah product | blah blah Product | 18,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.
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.
User | Count |
---|---|
40 | |
32 | |
30 | |
16 | |
16 |