title: SugarCRM: How to filter query in subpanel Select popup that is specific for one module only
body: <p>I am using SugarCRM 6.5. I have a Users subpanel from my custom module. When I click Select, I need to filter the list of users. The challenge is it will only filter when triggered from the custom module and should not from other module using the User popup.</p>
  
  <p>Tried this solution <a href="https://stackoverflow.com/questions/29285938/how-i-can-customize-query-in-view-popup-in-sugarcrm">How I can customize query in view.popup in SugarCRM</a> but it doesn't work on my end.</p>
  
  <p>I manage to filter from User.php, adding the query filter in create_new_list_query, however it affects other module (it filters when it should not). I cannot figure out how to add condition for the custom module specific. It seems like it does not know what module that triggers the User popup.</p>
  
  <p>Any possible solutions?
  Your answers will be highly appreciated. Thank you!</p>