How to filter an LFD through another LFD

The scenario here talks about how to filter a list for e.g. of questions with another list of answers. This will require adding a custom button to the LFD to link to the other LFD filtering down the LFD so that it only shows items linked to originating item.

To set up the list of questions and the custom button we can do the following:

Once we have an LFD setup showing a list of questions, inside the component settings choose developer options and then Detail Template.

On line 52 in the image below I have added some HTML to create a button where the id is set to the Email of the person who wrote the question.

We also need to add a click event to the button so we can navigate to the answers. This can be added in the screen JS.

$(document).on('click', '.btn.btn-primary.view-answers' ,function(){
  Fliplet.Navigate.screen(123456, { query: '?questionID=' + $(this).attr('id') });

On the answers side we can have this filter applied to show the answers