Filter a table based on a row in another model

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am trying top add a new filter on my table that will show records that the user is following.

I have added a new model to the page with SObject EntitySubscription selected and added the condition to the main page model to filter records that their id equals to parentid in the EntitySubscription model. 

This filter does not seem to work. Does anyone knows what I may be missing? Thanks
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You should be able to do this with a subquery condition on your primary table - looking up Ententiy Subscription with a "filterable" condition adn then creating a toggle filter that activates that condition. 

If for some random reason Salesforce doesn't let you build subquery conditions on that object.  You can create the "My Subscriptions" model (make it first in the list) and then make a second model that has a filterable condition that limits the table to records that are the parent record of the items in the My Subscriptions model. 

That should work. 

PS - whenever filters don't work,  look in the browser console at the model information to see the specific SOQL that is being run and the specific conditions (and values) that are in place.  Open the console and type   "skuid.model.map()"   and off you go...
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
Thank you Rob using subquery condition worked.