filter
Studio_Creatio
8.0

Hello
Is there any possibility to show in a filter only the legal entities that I select in advance?

For example, in the "Branch" lookup, I would like to see only the legal entities with a property set by me, not all of the LE.

 

Like 2

Like

2 comments

Hello,

Unfortunately, the basic functionality of the platform doesn't allow you to filter values specified by you. However, we've registered this idea in our R&D team backlog for consideration and implementation in future application releases. Thank you for helping us to improve our product.

Great idea :) It's like also making sure some inactive values are not only inactive in dropdowns, but also in filters. 

Show all comments
FreedomUI
MultiSelectLookup
filter

Hi Team,
I have implemented a multi-select lookup field using the guidelines from this article:
https://customerfx.com/article/invoking-a-multi-select-lookup-dialog-on-a-creatio-freedom-ui-page/
Now, I have a requirement to filter the multi-select lookup based on another lookup field. I tried adding a filter for the entity schema name, but it is not being reflected. Is there a way to filter the multi-select lookup?



Like 1

Like

1 comments
Best reply

You can add the filterConfig to the request. Something like this, first create the filter(s): 

const filter = new sdk.FilterGroup();
await filter.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "UsrColumn", "Value");
 
// workaround for filters required in Creatio 8.1.0 and older
const newFilter = Object.assign({}, filter);
newFilter.items = filter.items;

Then add them in the request, something like this: 

entitySchemaType: "UsrMyLookupObject",
filtersConfig: {
	filterAttributes: [{
		name: "MyFilter",
		loadOnChange: false
	}],
	attributesConfig: {
		MyFilter: {
			value: newFilter
		}
	}
},

See additional examples here: https://community.creatio.com/questions/filter-crtopenlookuppagerequest

Ryan

You can add the filterConfig to the request. Something like this, first create the filter(s): 

const filter = new sdk.FilterGroup();
await filter.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "UsrColumn", "Value");
 
// workaround for filters required in Creatio 8.1.0 and older
const newFilter = Object.assign({}, filter);
newFilter.items = filter.items;

Then add them in the request, something like this: 

entitySchemaType: "UsrMyLookupObject",
filtersConfig: {
	filterAttributes: [{
		name: "MyFilter",
		loadOnChange: false
	}],
	attributesConfig: {
		MyFilter: {
			value: newFilter
		}
	}
},

See additional examples here: https://community.creatio.com/questions/filter-crtopenlookuppagerequest

Ryan

Show all comments
filter
mobile application
Mobile_Creatio
8.0

It is necessary to configure the filter CreatedBy=CurrentUser in the mobile application.

The filter is saved in the file UsrMobileNotesModuleConfig and referenced in the manifest.

The file is specified in the manifest:

},
"UsrMyNotes": {
   "RequiredModels": [
       "UsrMyNotes"
   ],
   "ModelExtensions": [],
   "PagesExtensions": [
       "UsrMobileUsrMyNotesActionsSettingsBlyzenkoWS",
       "UsrMobileUsrMyNotesGridPageSettingsBlyzenkoWS",
       "UsrMobileUsrMyNotesRecordPageSettingsBlyzenkoWS",
       "UsrMobileNotesModuleConfig"
   ]
}

Filter code:

Terrasoft.sdk.Module.addFilter("UsrMyNotes", Ext.create("Terrasoft.Filter", {
   type: Terrasoft.FilterTypes.Group,
   logicalOperation: Terrasoft.FilterLogicalOperations.And,
   subfilters: [
       {
           property: "CreatedBy",
           comparisonType: Terrasoft.ComparisonType.EQUAL,
           value: Terrasoft.sdk.CurrentUser.getContactId()
       }
   ]
}));

But it does not work. Please help.
 

Like 1

Like

1 comments

Hello,

The example you provided is relevant for the classic sections of the mobile application; however, it appears that you are using the Freedom UI interface for the mobile section of your object. To implement your task in this case, you need to change the Mobile[Object]GridPageSettings[Workplace] schema. In this schema, inside the array [ ], you need to add a block with the code:
{
    "operation": "merge",
    "name": "settings",
    "values": {
        "viewModelConfigDiff": "[{\"operation\":\"merge\",\"name\":\"Attribute_Items_ModelConfig\",\"values\":{\"filterAttributes\":[]}},{\"operation\":\"insert\",\"name\":\"MyFilter\",\"values\":{},\"parentName\":\"Attribute_Items_ModelConfig\",\"propertyName\": \"filterAttributes\"},{\"operation\":\"merge\",\"name\":\"Attributes\",\"values\":{\"MyFilter\":{ YOUR FILTER }}}]"
    }
}

To obtain the filter itself, you should use the following method:

  1. 1) In the Freedom UI designer, add a new list to your object on any page.
  2. 2) In this list, configure the filter you want to apply in the mobile application.
  3. 3) Save the filter and the page.
  4. 4) Open the code of the page and find the complete filter code inside it.
  5. 5) Insert this code inside the {"MyFilter":{ YOUR FILTER }}.

It's important to escape the " characters with a backslash, like this \", and the filter code should not contain tabs. As a result, your Mobile[Object]GridPageSettings[Workplace] page should look something like this:

[
{
    "operation": "merge",
    "name": "settings",
    "values": {
        "viewModelConfigDiff": "[{\"operation\":\"merge\",\"name\":\"Attribute_Items_ModelConfig\",\"values\":{\"filterAttributes\":[]}},{\"operation\":\"insert\",\"name\":\"MyFilter\",\"values\":{},\"parentName\":\"Attribute_Items_ModelConfig\",\"propertyName\": \"filterAttributes\"},{\"operation\":\"merge\",\"name\":\"Attributes\",\"values\":{\"MyFilter\":{\"value\": {\"items\": {\"154ca683-b9f9-4359-88ca-e9dfbd10481a\": {\"filterType\": 4,\"comparisonType\": 3,\"isEnabled\": true,\"trimDateTimeParameterToDate\": false,\"leftExpression\": {\"expressionType\": 0,\"columnPath\": \"Status\"},\"isAggregative\": false,\"dataValueType\": 10,\"referenceSchemaName\": \"CaseStatus\",\"rightExpressions\": [{\"expressionType\": 2,\"parameter\": {\"dataValueType\": 10,\"value\": {\"Name\": \"In progress\",\"IsFinal\": false,\"Id\": \"7e9f1204-f46b-1410-fb9a-0050ba5d6c38\",\"Image\": \"\",\"StatusColor\": \"#FFAC07\",\"value\": \"7e9f1204-f46b-1410-fb9a-0050ba5d6c38\",\"displayValue\": \"In progress\"}}}]},\"d819453a-7122-4f49-92e8-3b0d7e4601f5\": {\"filterType\": 4,\"comparisonType\": 3,\"isEnabled\": true,\"trimDateTimeParameterToDate\": false,\"leftExpression\": {\"expressionType\": 0,\"columnPath\": \"Status\"},\"isAggregative\": false,\"dataValueType\": 10,\"referenceSchemaName\": \"CaseStatus\",\"rightExpressions\": [{\"expressionType\": 2,\"parameter\": {\"dataValueType\": 10,\"value\": {\"Name\": \"New\",\"IsFinal\": false,\"Id\": \"ae5f2f10-f46b-1410-fd9a-0050ba5d6c38\",\"Image\": \"\",\"StatusColor\": \"#0058EF\",\"value\": \"ae5f2f10-f46b-1410-fd9a-0050ba5d6c38\",\"displayValue\": \"New\"}}}]}},\"logicalOperation\": 1,\"isEnabled\": true,\"filterType\": 6,\"rootSchemaName\": \"Case\"}}}}]"}
}
]

After that, save the changes and synchronize the mobile application. As a result, the section should be filtered.

 

 

Show all comments
filter
m2m
folder
Sales_Creatio_enterprise_edition
8.0

Hi!

I'd like to add many-to-many relationship between Account and Contact. I've created an object "Account - Contact" and added some records to it.

Now I'd like to add a folder on Contacts list for displaying those contacts, who are related with "Our company" Account. Unfortunately, the list of columns for "Account - Contact" does not contain neither relationship-related lookup fields (like Contact, Account) nor any additional columns, stored in this object. There are only Quantity and some date fields.

 

 

I've tried to debug it and I realized that JSONs for DataService, which are generated by filter designer, try to use some aggregation function. Is there any way to solve my problem? The solution doesn't have to be simple and possible to do it by GUI :) I can modify the JSON, but so far I couldn't do it correctly in this case.

 

Is is technically possible for DataService, to use simple comparison in lookup for backward related objects, like "Account - Contact", or I'm restricted to use some kind of aggregation?

 

 

 

Like 3

Like

2 comments
Best reply

This is because there can be multiple "Account - Contact" records for  an account so the choices there are aggregates only. If you're adding this as a filter condition, select "Quantity" and then choose Quantity > 0. Then, inside of that, as a condition within the Quantity>0, you can add additional conditions, such as "Account" = "Some specific account", etc. 

Ryan

This is because there can be multiple "Account - Contact" records for  an account so the choices there are aggregates only. If you're adding this as a filter condition, select "Quantity" and then choose Quantity > 0. Then, inside of that, as a condition within the Quantity>0, you can add additional conditions, such as "Account" = "Some specific account", etc. 

Ryan

Oh, I didn't believe the solution is so simple :) Thank you!

Show all comments
detail
sort
filter
Financial_Services_Creatio_lending_edition
7.18

Hello creatio community,

 

I have created a column into the object "RegDocumentType" named "Order". This object is used as a foreign key in "DocListInFinApp" which is displayed in "FinAppLendingPage" screen.

 

I want to apply a default sorting by RegDocumentType.Order in FinAppLendingPage as below:

"DocListInFinAppDetail": {
	"schemaName": "DocListInFinAppDetail",
	"filter": {
		"masterColumn": "Id",
		"detailColumn": "FinApplication"
	},
	"sortColumn": "Document",
	"sortColumnDirection": Terrasoft.OrderDirection.ASC,
	"sortColumnIndex": 0
},

 

The filter applied its working when I open the page. Do you have any suggestions on how to fix it?

Like 0

Like

1 comments

Hello,

 

In case you need to modify the default sorting you need to use the initQuerySorting method override (should be done in the detail schema and also replace the "UsrOrderColumn" with the column you need to use for sorting):

initQuerySorting: function(esq) {
                    const sortedColumn = esq.columns.find("UsrOrderColumn");
                    if (!sortedColumn) {
                        return;
                    }
                    sortedColumn.orderPosition = 0;
                    sortedColumn.orderDirection = Terrasoft.OrderDirection.DESC;
                },

Once saved you can refresh the page and the default sorting will be changed.

Show all comments
MutualFiltration
filter

I encountered an unexpected issue with the MutualFiltration functionality, specifically related to filtering sub-category in InfoMarket elements based on the selected category. This feature had been functioning correctly previously, but it seems to have stopped working without any recent updates or changes from our end.

As per our implementation, the MutualFiltration is supposed to filter the sub-category elements (UsrSousCategorie) based on the relationship between the selected category (UsrCategorie) and its corresponding sub-categories. The filtering logic is as follows: UsrSousCategorie.UsrCategory == UsrCategorie.



Terrasoft.sdk.Model.addBusinessRule("UsrMarketInfo", {

    ruleType: Terrasoft.RuleTypes.MutualFiltration,

    triggeredByColumns: ["UsrCategorie","UsrSousCategorie"],

    connections: [{

    parent: "UsrCategorie",

    child: "UsrSousCategorie",

    connectedBy:

        {

            modelName: "UsrSousCtegorieInfoMarket",

            property: "UsrCategory",

        }

    

    }]

});

Like 0

Like

3 comments

Hello!

 

Could you please provide more information on how this logic has been implemented?

 

Thank you!

Hanna Skalko,

just we need to filter the field sous category with the selected category , show in the lookup filed  the sous-category that

UsrSousCategorie.UsrCategory == UsrCategorie.

sabri krima,

 

Hello,

 

The issue was fixed in terms of a ticket registered on our end. In terms of this issue we've identified that:

 

1) The issue was related to the offline application mode workflow

2) The 

 

connectedBy:

            {

                modelName: "UsrSousCtegorieInfoMarket",

                property: "UsrCategorie",

            }

 

was not needed in the rule

3) UsrCategorie column should've been also specified in the SyncColumns property for the UsrSousCtegorieInfoMarket model (in the ModelDataImportConfig)

4) The namings of the columns should be the same in the parent and child properties. In your case the columns and the rule should've been:

 

UsrSousCategorie.UsrCategorie == UsrCategorie.

Show all comments

Hi community,

 

I need to show only active users in the Owner field of the activity mini page.

 

How can I do that?

 

Thank you!

Like 1

Like

2 comments

I could not find the field on contact record for this so I created a lookup with record status (active/inactive or something similar) and then used the add filter business rule on the mini page to only display specific owners.

Hi, Clara Fioranzato! 

 

This field is implemented by development methods, so unfortunately you cannot change it with basic methods. 

 

But you can add this filtering condition by creating a replacement view model schema for the page. To do this, use the instructions below with an example of such a setting:  

 

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/platform-customization/classic-ui/record-page/field/examples/set-up-filtering-of-lookup-field-values 

 

We also recommend reading a similar post on our community where this topic has already been raised. 

https://community.creatio.com/questions/show-only-active-users-owner-activity-filed 

 

Best regards, 

Halyna!

Show all comments
filter
lookup
8.0

Hi everyone,

 

in the 7... versions business rules managed the filtering for the lookups, but in the 8.1 version I couldn't find it there. This is the previous article: Filter values in a lookup field | Creatio Academy

 

I would like to select only Managers from the contacts when I connect the Opportunity to the contact.

 

Thanks, Timea

Like 0

Like

2 comments

I think is still in Business Rules. If its a lookup associated to the main entity you should be able to do it there. Check in the sidebar that you can add BRs for the page and for the entity. The filtering of the lookup should be in the second one.



If its a lookup inside an editable list then I'm not sure how to do this. Before that was done in the detail BRs but here I'm not seeing how.

Hello!



Unfortunately, there is no option to filter lookup fields in the same way as in the Classic UI.

 

We've added it to our R&D team's backlog for consideration and implementation in future application releases.

Show all comments
filter

Hi,

 

I am trying to set up a filter that shows opportunities that entered a certain stage within the current month. Can anyone explain how I can achieve this?

 

Thanks in advance.

Like 0

Like

5 comments
Best reply

Hello,

 

In order to set up the filter to see the opportunities that entered a certain stage within current month, you need to create a filter by the "Start Date" field in "Stages" opportunity detail:

Then change "count" to "exists":

And in the sub-filter choose the field "Start". This is the field of the start date of a stage: 

And along with this setup a regular filter with the needed stage.

Create a filter in which your select Stage = "Your stage" AND Created on = "Current Month"

Hello,

 

In order to set up the filter to see the opportunities that entered a certain stage within current month, you need to create a filter by the "Start Date" field in "Stages" opportunity detail:

Then change "count" to "exists":

And in the sub-filter choose the field "Start". This is the field of the start date of a stage: 

And along with this setup a regular filter with the needed stage.

Hassan Tariq, thank you for you reply!

Mira Dmitruk, I really appreciate the in depth reply. That has helped me achieve what I needed. Thanks so much!

 

I am in need of something similar but have a question.  I want to see if any opportunity changed to a stage in the previous week.  I was curious based on the above answer if a opportunity changed to the stage we are searching but also was changed to the next stage if it look at the current stage the opportunity was in or if it ever changed to that stage during that timeframe?

Show all comments

Hi Community, 

I need to filter the values of the Contact Type field so that, when creating a contact, only the values "Employee"(Cliente) and "Supplier"(Proveedor) are shown if the user role is SysAdmin. Any help or guidance is welcome. Thank you very much!

Like 0

Like

1 comments

Hello,

 

ESQ is asynchronous and it won't be able to fit your business task. You need to use the FilterGroup instead to achieve the goal. Here is the community thread with a question similar to yours. Also, here's another link with useful information. 

Show all comments