<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Creating Custom Filters In Sugar 7</title><link>/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><description>This article is aimed at beginning to intermediate SugarCRM developers who want to create custom filters in SugarCRM version 7.This does not cover the custom filters that users can create for themselves. Those are stored on a per-user basis an...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Thu, 13 Jul 2017 08:51:26 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Venkatesh.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Sugar CRM Version: 7.8.2.0&lt;/span&gt;&lt;p&gt;I would need to modify the filter query string parameter for a specific field from `$starts` to `$equals`. Basically i would need to arrange the Search look up popup.&lt;/p&gt;&lt;p&gt;Any help would be highly appreciated.&lt;/p&gt;&lt;p&gt;Current query String -&lt;/p&gt;&lt;p&gt;&amp;amp;filter[1][$or][0][name-0][$starts]=USER__TYPED_INPUT&lt;/p&gt;&lt;p&gt;&amp;amp;filter[1][$or][1][name-1][$starts]=USER__TYPED_INPUT&lt;/p&gt;&lt;p&gt;&amp;amp;filter[1][$or][2][name-2][$starts]=USER__TYPED_INPUT&lt;/p&gt;&lt;p&gt;Query string should be updated like below - &lt;/p&gt;&lt;p&gt;&amp;amp;filter[1][$or][0][name-0][$equals]=USER__TYPED_INPUT&lt;/p&gt;&lt;p&gt;&amp;amp;filter[1][$or][1][name-1][$starts]=USER__TYPED_INPUT&lt;/p&gt;&lt;p&gt;&amp;amp;filter[1][$or][2][name-2][$starts]=USER__TYPED_INPUT&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Fri, 13 Jan 2017 14:54:06 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Abhishek Bhardwaj.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;I&amp;#39;m using enterprise could based edition 7.7 &amp;amp; I want to create some new custom filter..&lt;/span&gt;&lt;p&gt;How it is possible when I have no access of code , file structure and database.&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Wed, 06 May 2015 15:48:29 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by diegoalexDiegoAlex.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Is there any way to filter by a relate field?!&lt;/span&gt;&lt;p&gt;I&amp;#39;ve tried some ways but no fun =/&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Tue, 28 Apr 2015 22:11:40 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Jamie Soffer.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Can I accomplish this same task of creating custom filters that all users can see within my admin panel or is it only possible to create these filters as a developer?&lt;/span&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Jamie&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Mon, 16 Mar 2015 14:24:41 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by JD.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;I am trying to add a dynamic filter on a relate field and performed all the steps as per the below mentioned link.&lt;/span&gt;&lt;p&gt;&lt;a href="http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.5/20_UI_Model/30_Views/05_Filters/" rel="nofollow" target="_blank"&gt;http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.5/20_UI_Model/30_Views/05_Filters/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Now my problem is quick search working fine with my filter and getting dynamic value to return specif records but when I click on &amp;#39;search for more&amp;#39; it pre-select my filter but never put dynamic value in the query string due to which filter does not work as expected. Can anyone help me out with this?&lt;/p&gt;&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Mon, 09 Feb 2015 15:50:44 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by chesk4.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Hi, I&amp;#39;m trying to create a filter for a integer field (stock) in a custom module and I&amp;#39;ve created the file stock.php as follows:&lt;/span&gt;&lt;p&gt;$module_name = &amp;quot;custom_module&amp;quot;;&lt;/p&gt;&lt;p&gt;$viewdefs[$module_name]['base']['filter']['stock'] = array(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;create&amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; false,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;filters&amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; array(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;id&amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; &amp;#39;stock&amp;#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;name&amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; &amp;#39;LBL_STOCK_FILTER&amp;#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;filter_definition&amp;#39; =&amp;gt; array(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;stock&amp;#39; =&amp;gt; array(&lt;/p&gt;&lt;p&gt;$gt =&amp;gt; &amp;#39;0&amp;#39;&lt;/p&gt;&lt;p&gt;),&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;editable&amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; false,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/p&gt;&lt;p&gt;);&lt;/p&gt;&lt;p&gt;The filter should show the records of the custom module which have stock &amp;gt; 0 but it&amp;#39;s only showing those ones with stock = 0.&lt;/p&gt;&lt;p&gt;Any help with that will be very apreciated.&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Tue, 28 Oct 2014 03:07:40 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by kuehltha.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Any way to make this work on a Portal List View?&lt;/span&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Fri, 10 Oct 2014 03:13:55 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Nabil Francis.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Is it possible to have the filter act in a dynamic way? I am looking at adding a new date range for the date (which I can use the Between option for) but would need to have the dates change dynamically once the filter is requested.&lt;/span&gt;&lt;p&gt;Thanks&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Fri, 19 Sep 2014 13:30:47 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Karl Metum.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Set &amp;#39;create&amp;#39; =&amp;gt; true in all filters if you are having issues on SugarCRM 7.2.2.0&lt;/span&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Tue, 09 Sep 2014 16:54:19 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Gustav Lindstr&amp;ouml;m.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Great post! How do you add filtering on current user in php code?&lt;/span&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Mon, 21 Jul 2014 13:35:45 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by karan.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;This works like charm for me but recently i have faced one issue and I just want to know from others if anyone has faced same problem or not :&lt;/span&gt;&lt;p&gt;If i have created a filter as per the method described above then I don&amp;#39;t see a &amp;quot;Create&amp;quot; button in filters part in recordlist view &lt;/p&gt;&lt;p&gt;I verified by removing the filter and again &amp;quot;Create&amp;quot; button came&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Mon, 14 Jul 2014 14:43:16 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Scott.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;One problem we are having is we have certain users we want to prevent from Editing Accounts but we want them to be able to create their own search filters. They can&amp;#39;t. If you remove Edit of Account you can&amp;#39;t create filters. Any work around?&lt;/span&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Wed, 16 Apr 2014 07:34:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>2</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Karl Metum.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;How would one add a related_field to the available fields in a filter?&lt;/span&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Creating Custom Filters In Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-custom-filters-in-sugar-7</link><pubDate>Thu, 13 Mar 2014 03:51:17 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:621ad345-4f8d-4cb4-9f71-d049641dcc9a</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by yc.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Hi,&lt;/span&gt;&lt;p&gt;I&amp;#39;ve been trying to implement your example but with some extra customization. I need to create a &amp;quot;custom default filter&amp;quot; for a a relate field selection popup (which ends up using all the regular list code)&lt;/p&gt;&lt;p&gt;I need to get a date range already typed in by the user but not yet saved in order to filter the relate item the user can select. It&amp;#39;s a rental customization so only items available for the entirity of a date range should show up.&lt;/p&gt;&lt;p&gt;How can I get the typed in values from the parent panel? I assume it&amp;#39;s some javascript/document get value thing but how do I place that in the PHP filter file?&lt;/p&gt;&lt;p&gt;Thanks in advance for any input!&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=708&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>