How to create @Query based on input

Overview

  • I have a view B contains @Query for cars, now this @Query predicate depends on an input which is passed from view A.

Current approach

  • I am creating @Query in the init of view B by using _cars.

Questions

  1. Now how can I compose @Query based on input from view A?
  2. Is my approach correct? In my approach Query will be created every time init gets called
  3. Or is there a better approach?
How to create @Query based on input
 
 
Q