Filtering
Filters
list
section list

Hi,

Is there a way to filter a section list for it to show only the first 10 records?

 

Regards.

Like 0

Like

1 comments

Hello Javier,

Currently there is no possibility to do that with the help of standard filtration tool. I will create a request to our R&D team so they could add this functionality to the OOB version. Thank you for this suggestion!

Also please note that you can use sorting tool in a section that also allows to show first 10 records based on sorting direction. Also you can use tags so to mark 10 records that can be found in future if needed.

Also you can add a field on the page (integer type) that can be auto incremented upon records adding. You will also need to add a system setting that stores current number of this field. At the very beginning it will be 0. After that you need to create a business process that will update the value of added on the page field for the new record with the value of that system setting and after that increase the value of system setting to n+1 where n - is a current value.

Best regards,

Oscar

Show all comments
Filtering
Filters
look up filters
lookup
studio

Hi,  

I have the following multiple filters working in a lookup:

 

"filters": [

                        function() {

                            var filterGroup = Ext.create("Terrasoft.FilterGroup");

                           

                            filterGroup.add("Segment",

                                Terrasoft.createColumnFilterWithParameter(

                                    Terrasoft.ComparisonType.EQUAL,

                                    "GlgSegment",this.get("GlgSegment").value));

                            

                            filterGroup.add("SegmentLeaderRole",

                                Terrasoft.createColumnFilterWithParameter(

                                    Terrasoft.ComparisonType.EQUAL,

                                    "Role","A25AD3ED-1095-4774-91E1-54BED571EA3B"));        

                                    

                                    

                            return filterGroup;

                        }

                    ]

 

I need to add another filter but ordering the filters in the following logical operation:

Segment AND (Role OR Role)

Looking forward to your comments. 

Regards, 

Javier

 

 

 

Like 0

Like

2 comments

Just found the solution to this problem in the following thread:

https://community.bpmonline.com/questions/lookup-field-filter

Javier Collazo,

You can also take a look at this chunk of code, it also represents the combination of two filter groups. The idea is to make firstly one filter group for OR clause. Afterwards, you create a second filter group, which combines a first one OR and other clause. By default filters are added via AND.

getCurrentUserAndTypesFilter: function() {

   var filterGroup = new this.Terrasoft.createFilterGroup();

   filterGroup.logicalOperation this.Terrasoft.LogicalOperatorType.OR;

   var innerFilterGroupCreatedBy = new this.Terrasoft.createFilterGroup();

   innerFilterGroupCreatedBy.add("CurrentUser"this.Terrasoft.createColumnFilterWithParameter(

      this.Terrasoft.ComparisonType.EQUAL"Tag.CreatedBy",this.Terrasoft.SysValue.CURRENT_USER_CONTACT.value));

   innerFilterGroupCreatedBy.add("PrivateType"this.Terrasoft.createColumnFilterWithParameter(

      this.Terrasoft.ComparisonType.EQUAL"Tag.Type", TagConstants.TagType.Private));

   var innerFilterGroupOtherTypes = new this.Terrasoft.createFilterGroup();

   var types = [TagConstants.TagType.Corporate, TagConstants.TagType.Public];

   innerFilterGroupOtherTypes.add("OtherTypes",this.Terrasoft.createColumnInFilterWithParameters(

      "Tag.Type", types));

   filterGroup.addItem(innerFilterGroupCreatedBy);

   filterGroup.addItem(innerFilterGroupOtherTypes);

   return filterGroup;

},

Regards,

Anastasia

Show all comments

Hi Community,

I have created a Widget, which data is already populating. Any idea how I can filter data and put header labels on the grid and add action buttons on each record in the list.

 

Like 0

Like

1 comments

Dear Fulgen,

You can add filtration an captions in the configuration of your custom widget, in case you have created it via new module. In case you use the basic system functionality of List, there is a second tab when configuring the List. where you can apply needed filtration:

In any case you can find the needed widget in the SysDashboard table. In the "Items" column you can find the configuration of your widget. Here you can indicate column captions as well as filtration ("caption". "filterData"). Dashboard configuration looks like this:

{"DashboardGrid":{"parameters":{"caption":"Top emails by audience","sectionBindingColumn":"Id","sectionId":"9de4f21c-e418-4172-9c3a-1bf1ae366b92","entitySchemaName":"BulkEmail","filterData":"{\"className\":\"Terrasoft.FilterGroup\",\"items\":{\"d357f339-ce45-4586-b832-7f2d90808db5\":{\"className\":\"Terrasoft.InFilter\",\"filterType\":4,\"comparisonType\":3,\"isEnabled\":true,\"trimDateTimeParameterToDate\":false,\"leftExpression\":{\"className\":\"Terrasoft.ColumnExpression\",\"expressionType\":0,\"columnPath\":\"Status\"},\"isAggregative\":false,\"key\":\"d357f339-ce45-4586-b832-7f2d90808db5\",\"dataValueType\":10,\"leftExpressionCaption\":\"Status\",\"referenceSchemaName\":\"BulkEmailStatus\",\"rightExpressions\":[{\"className\":\"Terrasoft.ParameterExpression\",\"expressionType\":2,\"parameter\":{\"className\":\"Terrasoft.Parameter\",\"dataValueType\":10,\"value\":{\"Name\":\"Completed\",\"Id\":\"42328932-9ad6-4512-9950-662ffba2c53c\",\"value\":\"42328932-9ad6-4512-9950-662ffba2c53c\",\"displayValue\":\"Completed\"}}},{\"className\":\"Terrasoft.ParameterExpression\",\"expressionType\":2,\"parameter\":{\"className\":\"Terrasoft.Parameter\",\"dataValueType\":10,\"value\":{\"Name\":\"Starting\",\"Id\":\"c6e21ad8-e243-4656-aafc-1312f97c4521\",\"value\":\"c6e21ad8-e243-4656-aafc-1312f97c4521\",\"displayValue\":\"Starting\"}}},{\"className\":\"Terrasoft.ParameterExpression\",\"expressionType\":2,\"parameter\":{\"className\":\"Terrasoft.Parameter\",\"dataValueType\":10,\"value\":{\"Name\":\"In progress\",\"Id\":\"7789ac0c-450b-40a3-b341-3d6b799649b4\",\"value\":\"7789ac0c-450b-40a3-b341-3d6b799649b4\",\"displayValue\":\"In progress\"}}}]}},\"logicalOperation\":0,\"isEnabled\":true,\"filterType\":6,\"rootSchemaName\":\"BulkEmail\",\"key\":\"\"}","style":"widget-navy","orderDirection":2,"orderColumn":"SendCount","rowCount":5,"gridConfig":{"items":[{"bindTo":"Name","caption":"Name","type":"link","position":{"column":0,"colSpan":16,"row":1},"aggregationType":"","metaCaptionPath":"Name","metaPath":"Name","path":"Name","serializedFilter":"{\"className\":\"Terrasoft.FilterGroup\",\"items\":{},\"logicalOperation\":0,\"isEnabled\":true,\"filterType\":6,\"key\":\"\"}"},{"bindTo":"SendStartDate","caption":"Sent on","type":"text","position":{"column":17,"colSpan":5,"row":1},"dataValueType":7,"aggregationType":"","metaCaptionPath":"Started on","metaPath":"SendStartDate","path":"SendStartDate","serializedFilter":"{\"className\":\"Terrasoft.FilterGroup\",\"items\":{},\"logicalOperation\":0,\"isEnabled\":true,\"filterType\":6,\"key\":\"\"}"},{"bindTo":"SendCount","caption":"Sent","position":{"column":22,"colSpan":2,"row":1},"dataValueType":4,"metaPath":"SendCount","path":"SendCount","orderDirection":2,"orderPosition":1}]}},"widgetType":"DashboardGrid"},"DashboardGrid1":{"parameters":{"caption":"Links by number of clicks","sectionBindingColumn":"BulkEmail","sectionId":"9de4f21c-e418-4172-9c3a-1bf1ae366b92","entitySchemaName":"BulkEmailHyperlink","style":"widget-turquoise","orderDirection":2,"orderColumn":"ClicksCount","rowCount":5,"gridConfig":{"items":[{"bindTo":"Url","caption":"URL","type":"link","position":{"column":0,"colSpan":20,"row":1},"dataValueType":1,"aggregationType":"","metaCaptionPath":"URL","metaPath":"Url","path":"Url","serializedFilter":"{\"className\":\"Terrasoft.FilterGroup\",\"items\":{},\"logicalOperation\":0,\"isEnabled\":true,\"filterType\":6,\"key\":\"\"}"},{"bindTo":"ClicksCount","caption":"No. of clicks","position":{"column":20,"colSpan":4,"row":1},"dataValueType":4,"metaPath":"ClicksCount","path":"ClicksCount","orderDirection":2,"orderPosition":1}]}},"widgetType":"DashboardGrid"}

Regards,

Anastasia

Show all comments
look up filters
Filtering
multiple look up filters
Sections

Hi,

There are default section filters available in all sections. But customisation can be done to include other filters also. For example, adding 'Status' field as default filter in orders section.

You can also set default value for the status filter so that only orders with that status will list in the grid.

We have created a blog where step by step explanation on  how to create custom section filters in orders section for 'status' field is given 

http://agiliztech.com/2019/03/25/bpmonline-custom-section-filters/

Like 1

Like

Share

6 comments

Hi Sriraksha, Nice post, I was looking for something like this and am implementing it at a customer. I have 2 questions that maybe you can help:

1) where is the documentation for the " initFixedFiltersConfig" method? where can I find all parameteres that are accepted by the method? I tried to find it here https://academy.bpmonline.com/api/jscoreapi/7.12.0/index.html but without success.

2) I actually need the filter to return a subset of a columnfor the values available to be chosen. Something like this:

columnName: “Owner”,

AND

"OwnerIsAproved" == true

Do you know how I could achieve this?

 

Thanks in advance,

Luis

Luis Tinoco Azevedo,

1) There is no documentation regarding the initFixedFiltersConfig method due to the fact that the method is in the configuration. Please use Ctrl+Shift+F in a browser developers console and you'll find it. Please read the code and you'll find all the information about the method.

The jscoreapi documentation describes only core methods that you can find neither in the configuration nor in the browser. The methods are in all-combined.js.

2) If you need complex filters it's much easier to use dynamic folders. You can configure them according to your needs and save them. 

Hi Eugene,

Thanks for the feedback.

1) It's clearer now why it does not show on the jscoreapi.

2) I understand the dynamic folders sugestion, I have 2 comments , that has made us look for another solution:

a) Dynamic fitlers are easy for me to setup but are not very intuitive for some end users

b) In this specific case we need to have dinamic filters for the combination of 2 variables: "Empresa Rangel"(a subset of Account's that has made post the question on how to get this subset) and "tipo de sinistro", and the filters need to work in such a way that I need to quickly change between all combinations of these 2 variables. If I create all of the necessary combinations I'll have to create 45 advanced filter folders which is not very practical.

The implementation so far is almost has I need it to work with 2 extra filters:

I just need that the filter on the account returns only the accounts that match a true boolean ("empresa Rangel" == true) in the account section.

Any help on how I could achive this?

Thanks in advance

In order to achieve the goal please add a checkbox and a method that will check the checkboxes' state each time it's changed. Please find an example in the case section. There is a checkbox called "Show closed cases" that does the mentioned functionality.

 

Hi can we add text filter for eg: I want to add custom filter for Customer name that will be a text can it be done? 

Bhumika Bisht,

 

Hi,

 

Using initFixedFiltersConfig method I am not sure if it's possible, however there is such filtration in the Product catalogue where you can input product name and only products with the needed name will be shown. What should be studied is the logic behind QuickSearchModule module in the ProductSelectionSchema. I was able to replicate it in the Orders section:

and (for example searching for ORD-4):

Pay attention to getQuickSearchFilterConfig, onQuickSearchFilterUpdate, handleFilterForGridDataView and _clearGridData methods there, properly override the loadGridData method, specify UpdateQuickSearchFilter and QuickSearchFilterInfo messages and you should be able to get the same result.

Show all comments

Right now if you add a filtration business rule to a record page in a section, it only filters the options for the column on a record page. If you close the record and look at the list view and click filters/folders, all of the column's options are available as opposed to only the filtered options that were available in the record page.

Use case example: If you want portal users to only be able to see a select few accounts in the system, you can apply a business rule on the portal cases record page to filter the accounts column so that portal user can only see the accounts you want them to. However, if that portal user goes to the main portal cases section in the list view and opens a new filter on accounts, the menu for setting up the filter shows ALL accounts they have access to.

The only solution right now is to manage by records and take away access to the account records you don't want them to see. This can be cumbersome to manage. It might be nice to have the option to apply field filter business rules that work on the list view for the section.

2 comments

Dear Mitch,

I have forwarded your request to our business analysts. They will evaluate the possibility of implementation in future system releases. Thank you for the idea! 

Best regards,

Angela

Dear Mitch,

You've described the right way to achieve your goal. Records have to be managed using access rights. Other ways are insecure.

Show all comments
Filtering
7.13_()
sales

the AccountFolder.SearchData is a binary field that has the filter query. On the server side, how can I use that field to apply that filter on the "Account" and get all the account Ids?  

Like 0

Like

1 comments

Hello Kumar,



Unfortunately there is no possibility to filter binary fields directly in esq queries directly on server side. The SearchData  field contains filter for Accounts that can get into the folder, so if you need accounts from this folder you can select it from table AccountInFolder.



Actually, if the task is to get Accounts that fits for that filter, we recommend to built esq query matching the filter. It is much more easier and productive.



Best regards,

Alex

Show all comments

Hello,

I'm trying to get the list of OpportunityFile associated with an Opportunity with no success.

I tried the following requests:

1.Using the link Url I'm getting a "Not Implemented" exception.

https://.bpmonline.com/0/ServiceModel/EntityDataService.svc/Opportunity…

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<script/>
<code>4

Not Implemented

Not Implemented
System.Data.Services.DataServiceException

at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage)
at System.Data.Services.DataService`1.HandleRequest()

Method 'SelectMany' not supported
System.NotSupportedException

at Terrasoft.Core.Entities.EntityQueryProvider.VisitMethodCall(MethodCallExpression node)
at Terrasoft.Core.Entities.EntityQueryProvider.Build(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.LoadEntityCollection(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.ExecuteEnumerable(Type elementType, Expression expression)
at Terrasoft.Core.Entities.EntityQuery`1.GetEnumerator()
at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)

2. Using the $filter based on OpportunityId I'm receiving an exception saying the "OpportunityId not found".

https://.bpmonline.com/0/ServiceModel/EntityDataService.svc/Opportunity… eq guid''

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<script/>
<code>1

Collection item with name OpportunityId not found.

Collection item with name OpportunityId not found.
Terrasoft.Common.ItemNotFoundException

at Terrasoft.Core.Entities.EntitySchema.GetSchemaColumnByPath(String columnPath)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.CreateExpression(Expression node)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.CreateSimpleFilter(BinaryExpression binary)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.CreateFilter(Expression node)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.BuildBlock(MethodCallExpression node)
at Terrasoft.Core.Entities.EntityQueryProvider.VisitMethodCall(MethodCallExpression node)
at Terrasoft.Core.Entities.EntityQueryProvider.Build(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.LoadEntityCollection(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.ExecuteEnumerable(Type elementType, Expression expression)
at Terrasoft.Core.Entities.EntityQuery`1.GetEnumerator()
at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage)
at System.Data.Services.DataService`1.HandleRequest()

How can I get the list and avoid the exceptions? 

Thanks in advance. 

Like 0

Like

3 comments

Hello Radu,

You can use the following filter to accomplish this: 

https://<server>.bpmonline.com/0/ServiceModel/EntityDataService.svc/OpportunityFileCollection?$filter=Opportunity/Id eq guid'<opportunity_id>'

Note, the filter itself is as follows (forward slash between the Opportunity and Id): 

Opportunity/Id eq guid'someguid'

Ryan

Ryan Farley,

Thanks Ryan. It works.

Hello Radu,



You are experiencing such difficulties cause request is built in wrong way.

Also, check Ryan`s answer above, it seems that it`s correct.



How to create request with filter to ODATA service you can find here:

https://academy.bpmonline.com/documents/technic-sdk/7-13/examples-reque…

Show all comments
oData
Filtering
collection
7.13_()
sales

Hi,

I'm trying to get a list of OpportunityFile associated with an OpportunityId and it's seems it's not possible using ODATA.

1. If I'm using this Url https://server.bpmonline.com/0/ServiceModel/EntityDataService.svc/Oppor… I'm getting a "Not Implemented" exception

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<script/>
<code>4

Not Implemented

Not Implemented
System.Data.Services.DataServiceException

at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage)
at System.Data.Services.DataService`1.HandleRequest()

Method 'SelectMany' not supported
System.NotSupportedException

at Terrasoft.Core.Entities.EntityQueryProvider.VisitMethodCall(MethodCallExpression node)
at Terrasoft.Core.Entities.EntityQueryProvider.Build(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.LoadEntityCollection(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.ExecuteEnumerable(Type elementType, Expression expression)
at Terrasoft.Core.Entities.EntityQuery`1.GetEnumerator()
at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)

2. If I'm using this Url https://server.bpmonline.com/0/ServiceModel/EntityDataService.svc/Oppor… eq guid'e14b9eb7-99ff-43a6-bf26-a60b23b3ec12') I'm getting the following exception:

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<script/>
<code>1

Collection item with name OpportunityId not found.

Collection item with name OpportunityId not found.
Terrasoft.Common.ItemNotFoundException

at Terrasoft.Core.Entities.EntitySchema.GetSchemaColumnByPath(String columnPath)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.CreateExpression(Expression node)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.CreateSimpleFilter(BinaryExpression binary)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.CreateFilter(Expression node)
at Terrasoft.Core.Entities.EntityQueryWhereBlockBuilder.BuildBlock(MethodCallExpression node)
at Terrasoft.Core.Entities.EntityQueryProvider.VisitMethodCall(MethodCallExpression node)
at Terrasoft.Core.Entities.EntityQueryProvider.Build(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.LoadEntityCollection(Expression expression)
at Terrasoft.Core.Entities.EntityQueryProvider.ExecuteEnumerable(Type elementType, Expression expression)
at Terrasoft.Core.Entities.EntityQuery`1.GetEnumerator()
at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage)
at System.Data.Services.DataService`1.HandleRequest()

3. Also, if I'm using this Url https://server.bpmonline.com/0/ServiceModel/EntityDataService.svc/Oppor… eq guid'b3427cc4-3b20-4c16-8d2a-058ada7e7631') I'm getting a different error.

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<script/>
<code>4

Syntax error at position 1.

Syntax error at position 1.
System.Data.Services.DataServiceException

at System.Data.Services.Parsing.ExpressionLexer.ValidateToken(TokenId t)
at System.Data.Services.Parsing.ExpressionLexer.ReadDottedIdentifier(Boolean allowEndWithDotStar)
at System.Data.Services.RequestQueryProcessor.ReadExpandOrSelect(String value, Boolean select, IDataService dataService)
at System.Data.Services.RequestQueryProcessor.ProcessSelect()
at System.Data.Services.RequestQueryProcessor.ProcessQuery()
at System.Data.Services.RequestQueryProcessor.ProcessQuery(IDataService service, RequestDescription description)
at System.Data.Services.RequestUriProcessor.ProcessRequestUri(Uri absoluteRequestUri, IDataService service, Boolean internalQuery)
at System.Data.Services.DataService`1.HandleRequest()

It seems the filtering is not working on associated collection entities. Do you have any ideas?

Regards,

Radu

Like 0

Like

1 comments

Dear Radu,

Please see the example below. Draw your attention to the column OpportunityId syntax - Opportunity/Id

 

http://localhost:8006/0/ServiceModel/EntityDataService.svc/OpportunityF… = Opportunity/Id eq guid'410006e1-ca4e-4502-a9ec-e54d922d2c00'

 

Regards, 

Anastasia

Show all comments
detail
Filtering
7.12_()
studio

Hi Community,

How can I filter the detail based on the selected look up field. The list in detail will depend on the selected value in the look up so every time the user will change the value of look up the detail list will change also.

 

Thanks

Like 0

Like

2 comments

Dear Fulgen,

Hope you are doing great.

Unfortunately, there are no any basic tools in the system to implement this idea, however there is one solution. You can make up a business processes that will trigger once you modify some lookup data on a page. For instance, once you change the account type to some particular one, the business entity detail will also be changed according to the account type.

Hope this solution will help you. 

Best regards,

Dean 

I can bring Contact's Communication options to Lead's detail by binding Communication options.Contact to Lead.Contact field. Maybe you want similar behavior?

Show all comments
7.11
Filtering
studio

What are the conditions to filter and get the "Overdue invoices"?

Like 0

Like

1 comments

Hello.

First of all, the invoices do not have the due date out of the box, but you can use the date field instead. You need to add a condition, that the date is less than the current date and the invoice status is not final.

Best regards,

Matt

Show all comments