AnsweredAssumed Answered

How can I select a record with 'custom_where' based on dropdown value?

Question asked by derrickoltmann derrickoltmann on Nov 20, 2014
Latest reply on Nov 21, 2014 by derrickoltmann derrickoltmann
This seems like something that should be quite simple, but it's got me stumped.

How do I go about selecting a record using 'custom_where' based on the value of a dropdown?

I am trying to create a dashlet that will show me a list of vendor records which do not have an EIN and are not selected as two of six options in a drop down. 

I've tried just about every combination I could think of, here's the last two that I was smart enough to save after they didn't work...

//'custom_where' => ' AND ((vend_vendor.ein IS NULL OR vend_vendor.ein="") AND vend_vendor.status="active")',

//'custom_where' => ' AND ((vend_vendor.ein IS NULL OR vend_vendor.ein="") AND ' . $app_list_strings["vend_status_list"] . '="active")',

In the above code, I'm just trying to get it to select records which have "active" selected from a dropdown, I can (hopefully) just reverse it with an IS NOT or != from there...

EDIT: It would probably be helpful to point out that I'm using SugarCE.