how do i filter a deck

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have a model with workers, and model with worker tasks
how do i display a way to select a worker, and then see their tasks ?
this is for skuid mobile
Photo of ktyler

ktyler

  • 9,244 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Decks don't have filters built in to them (like tables do).  So you are going to have to depend on model conditions to get them filtered as you want. 
If you want to have dynamic filtering,  you will have to set up a means of displaying the list and then using an action framework sequence to pass an ID into the model condition and requery the model. 

Here is a sample page that filters account by industry.  https://github.com/skuidify/SamplePages/blob/master/pages/Mobile_Filter

In your case I think it would look like this. 

Build model to show list of workers somehow.  This could be in a deck, or in a dropdown coming from the relationship field of a new record on a related object (Dummy record)
On selection of that worker run an action sequence. 
- Pass worker ID into a condition on the workertasks model. 
- Requery worker tasks model
- Expose a panel with a deck of worker tasks. 

Cheers!