Run Script after filter selection on Skuid Model

  • 1
  • Question
  • Updated 4 years ago
  • Answered
  • (Edited)
I have skuid model displayed in table and also it has Table filter...

How to run the script after Table filter selected before data is populated in the table. 

I am trying to remove some of the data from model before table is populated based on another object data.

The same I have done using on On page load,using function(skuid) {... }

Pls share the inputs
Photo of Raj

Raj

  • 442 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Curious. If you plan to remove the data from the model, why even include the fields in the model?
Photo of Raj

Raj

  • 442 Points 250 badge 2x thumb
I have object A mapped with Skuid table(Object A) but based on filter conditions, I have to check first Object B and If object B has any records on selected filter conditions, I need to show the Object A record along with Object B records(Custom render) in 1 row.  If Object A has records for selected filter condition but Object B does not have records for filter condition, I will not show them in the Table. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Seems like you need only one model for this. Object A as the model you point to when creating the model. Object B as the model you point to when selecting child relationships. The tricky part would be to only include rows from Object A where there is an associated row in Object B.

Like, only Show Accounts that have Contacts.



(Edited)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
As long as there is some relationship between the two objects Pat does provide the most straightforward answer...
Photo of Raj

Raj

  • 442 Points 250 badge 2x thumb
Great.. Thanks!! I will change my logic based on your inputs.