AnsweredAssumed Answered

Filter portal if record present in different portal

Question asked by lcot17 on Jun 19, 2018
Latest reply on Jun 19, 2018 by lcot17

Here is my latest challenge. I was sure I had it solved the other day, but apparently not.

 

Take the 'Invoices' started solution as a working example. Let's assume I have a range of products in this solution, and I am going to create an Invoice. If I click 'Add Line item', it will bring up a popover displaying a portal of ALL products in the solution through a 'X' relationship.

 

I want to filter this portal to hide products that have already been added to the invoice. How would I achieve this?

My first guess was to add a calculation to the filter stating that If the invoice data ID matches the Invoice ID, then 0 (filter out).

 

This works for the first item added, but if I add these two fields being compared in the all products portal row, they have the same value. I assume this is down to the relationship type.

 

What would be the best solution to filtering a portal if the record is in a different related portal?

 

Thanks

Outcomes