I have been doing a lot of work of late connecting  Google App Engine, and in particular Google Wave with the Force.com platform. I have mentioned the importance and power of convergent platforms before, so I wont rehash that topic, instead I wanted to point out a feature on Force.com which I have briefly mentioned some time ago: Lookup Filters. Lookup Filters work, by filtering a search on a Lookup field (thus the name, Lookup Filter. 🙂 ). You can quickly visually see any fields that have filters enabled by looking for the little funnel icon:


 I had used lookup filters in the past with a single filter, something like this:

But for my current requirements, I needed to filter on more than one criteria. Luckily, Lookup Filters came to the rescue. I added my two criteria; in this scenario, the Google Wave address of a User could be either a 'person' (@googlewave.com), or a 'robot' (@appspot.com). 

The trick is to use the Advanced Filter Condition to combine filter rows. Being the typical techie, I jumped right in and started putting a formula expression in Advanced Filter Condition box. Don't make my mistake though. I should have taken a minute to click the help icon to learn how to use the Advanced Filter's. Like many things on the platform, the solution was easier than I thought. I had two filter criteria which I wanted to evaluate with an OR statement. The result was a formula like this:


Notice I have two criteria (#1 and #2). All I had to do was write a Advanced Filter Condition as logical as the name 'Lookup Filter': 1 OR 2

Problem solved. For now, however, it is time to get back to work.

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS