Dear collegaues

 

In Classic UI, I need to add a Filter business rule to can get only contacts with Email is completed. Some ideas how to solve this?

 

I tried not equal "", not contains "@" and others and didn't works

 

Thanks in advance

 

Regards

Julio

Like 0

Like

2 comments
Best reply


Hello,
 

Unfortunately, it's not possible to add such a filter using basic filters. However, you can write a custom filter in the schema code.

For example, for the Owner field on the AccountPageV2 schema, this filter may look like this:


define("AccountPageV2", [], function() {
   return {
       "entitySchemaName": "Account",
       "attributes": {
           "Owner": {
               "dataValueType": Terrasoft.DataValueType.LOOKUP,
               "lookupListConfig": {
                   "filters": [
                       function() {
                           var filterGroup = Ext.create("Terrasoft.FilterGroup");

                           filterGroup.add("HasEmail",
                               Terrasoft.createColumnFilterWithParameter(
                                   Terrasoft.ComparisonType.NOT_EQUAL,
                                   "Email",
                                   ""));
                           return filterGroup;
                       }
                   ]
               }
           }
       }
   };
});

This filter ensures that only contacts with the Email field not equal to empty string will be included in the selection for the Owner field.
 

You can learn more about such filtering in our academy: Link

Thank you for reaching out!


Hello,
 

Unfortunately, it's not possible to add such a filter using basic filters. However, you can write a custom filter in the schema code.

For example, for the Owner field on the AccountPageV2 schema, this filter may look like this:


define("AccountPageV2", [], function() {
   return {
       "entitySchemaName": "Account",
       "attributes": {
           "Owner": {
               "dataValueType": Terrasoft.DataValueType.LOOKUP,
               "lookupListConfig": {
                   "filters": [
                       function() {
                           var filterGroup = Ext.create("Terrasoft.FilterGroup");

                           filterGroup.add("HasEmail",
                               Terrasoft.createColumnFilterWithParameter(
                                   Terrasoft.ComparisonType.NOT_EQUAL,
                                   "Email",
                                   ""));
                           return filterGroup;
                       }
                   ]
               }
           }
       }
   };
});

This filter ensures that only contacts with the Email field not equal to empty string will be included in the selection for the Owner field.
 

You can learn more about such filtering in our academy: Link

Thank you for reaching out!

Thanks Pavlo

Show all comments