Stop model re-query after table sort or filter

  • 1
  • Question
  • Updated 2 years ago
  • Answered
In a table created from Model A, I check boxes next to some rows, and press a button to now display only these checked records in the table.

To do this, I created another model (Model B), where after pressing the button the selected rows are adopted into Model B. Then, the all rows are deleted in Model A. And lastly, the rows from Model B are adopted into Model A. This works until I filter or sort.

I want users to be able to sort and filter on this selection. However, after sorting or filtering, Model A is re-queried and all records are displayed again.

Does anyone have a suggestion on how to stop the model from being re-queried after clicking filter or sort?

Thanks
Photo of Sean

Sean

  • 630 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
An idea would be to create a condition on your primary model instead of adopting rows back in. You would make the condition "rows in another model". Set the model to your secondary model. Set it to filterable default off. Then in your action sequence, activate the condition.
Photo of Sean

Sean

  • 630 Points 500 badge 2x thumb
Thanks! That worked perfect. Just had to add a model query I activate the condition.

Really appreciate the quick response.