Control tab display using multiple SQL clauses

By | July 3, 2013

Hello folks! Back with one more interesting trick here.
As you all now you can control which tab is visible to who by using SQL condition box at the time of creating that tab. Like I can say if the tab should be visible to specific users I can put conditions using “U:” etc.
However I came across the scenario where I wanted to control the tab display using the SQL condition on Users entity as well as source of the case using case_source field. I have the custom tab named “Test” in cases context as follows.
Image1
I wrote the condition like “user_userid<>1 and case_source <> ‘phone’”. This gave me an SQL error as system was searching both the conditions on Users table and was failing to identify field “case_source”.
 Imagee2
Here is what I tried in SQL box which worked and resolved my problem. I separated the conditions with semicolon.
(user_userid<>’1′);(case_source<> ‘Phone’)