Filters
folders
Sections
List setup
7.11
sales

Hello Community!

I need filter the folder all (pre filter on load) the idea is show only contacts by specific type in the list but the user can change the filter.

Any idea?

Like 0

Like

5 comments

Dear Federico,

We have the great manual on how to add the fixed filter to the section in our Academy - https://academy.bpmonline.com/documents/technic-sdk/7-11/how-add-fixed-filters-block-section.

You can use it as an example. Just replace the FixedFilter by FolderFilter.

Lisa

 

Lisa Brown,

The example is working with a date duration and a owner field (LOOKUP). Is it possible to do the following?

1. Filter on a TEXT column.

2. The column is in the linked object. For example, Contact.Account.Name. Assume we are working on the ContactSectionV2

 

Dear Federico,

Yes, both cases described by you can work:

1. You can work with the text column with help of this filters: http://prntscr.com/hy36o6

2. This is how you should set up the folder's filter in order to filter by Account.Name: http://prntscr.com/hy363s

You can work with almost every type of column (like boolean, text. lookup etc.).

With best regards,

Oliver

Oliver,

What we asked is a fixed filter instead of advanced filter. I know that by using the advanced filter we can do most of search as we want. On the other hand the fixed filter has its limitation.

Dear Cheng,

Every filter you can build with the help of the advanced filters in the folder/sections is possible to build in the form of the fixed filters. There are no known limitations for the development of the functionality. 

Lisa

Show all comments
ESQ
Filters
7.11
studio

Hi Community!

How are you?

I hope you can help me!

 

I want to make a query with filters where the equivalent in sql server for example would be: "..Where field = 'Administrator' OR  field like 'Ope%' or field like 'Supe%'

 

 

Is there any way to include combinations of AND and OR with ESQ? Is there an alternative?

King regards,

Ezequiel

Like 0

Like

4 comments

Dear Ezequiel,

You can create the filter that would include AND and OR at the same time and would work as described. 

You need to build the filter as shown in the following example:

                var filters = Ext.create("Terrasoft.FilterGroup");
                filters.logicalOperation = this.Terrasoft.LogicalOperatorType.OR;
                filters.addItem(select.createColumnFilterWithParameter(Terrasoft.ComparisonType.START_WITH, "UsrPresents",
                               present.value));
                select.filters = filters;

 

Lisa

Hi Lisa! 

Thank you for you answer!

sorry, I expressed myself badly, I need to add a filter. The complete filter would be:

Where Id = 'some id' and (name = 'Administrator' OR  name like 'Ope%' or name like 'Supe%')

Can be done?

Regards,

Ezequiel

I show the example below

var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
				rootSchemaName: "SysUserInRole"
});
esq.addColumn("[SysFuncRoleInOrgRole:OrgRole:SysRole].FuncRole.Name", "RolFuncionaAsociado");
var esqFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "SysUser.Id", userId);
var esqFilter2 = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "[SysFuncRoleInOrgRole:OrgRole:SysRole].FuncRole.Name", nombreRol);

The second filter is who should have the OR combination

Regards,

Ezequiel

You can use my example above to create the correct filtration. Just make sure you add all the necessary filters to the collection and then combine them in the way you need. You can use the following example to add the filters to the collection:

// Adding created filters to query collection. 
esqCities.Filters.Add(esqFirstFilter);
esqCities.Filters.Add(esqSecondFilter);

More useful examples can be found in our Academy here - https://academy.bpmonline.com/documents/technic-sdk/7-11/use-entityschemaquery-creation-queries-database.

Lisa

Show all comments