Filtering
Filters
lookupListConfig
look up filters

Hi Team,

 I have been using a lookup field and implementing a filter via LookupListConfig.



Here I have an issue in filtering the values.



Step 1: If the logged-in used belongs to the System Administrator role, the filter for the lookup is working fine and it shows the records.

 

Step 2: If the same user is removed from the System Administrator role, the filter is not working and it does not shows any records.

Here is the utilization of lookupListConfig

"UsrApplyName": {
		                "dataValueType": Terrasoft.DataValueType.LOOKUP,
		                "lookupListConfig": {
		                	columns: [ "Id" ],
		                    "filters": [
		                        function() {
		                            var filterGroup = Ext.create("Terrasoft.FilterGroup");
									var CurContactAccount = Terrasoft.SysValue.CURRENT_USER_ACCOUNT.value;
		                          		filterGroup.add("IsActive",
		                                Terrasoft.createColumnFilterWithParameter(
		                                    Terrasoft.ComparisonType.EQUAL,
		                                    "UsrRecepientCompany",
		                                    CurContactAccount));
		                          		return filterGroup;
		                        }
		                    ]
		                }
					},

 

 

Kindly help me with the above hindrance and let me know what causes the difference and how to overcome it.





Regards,

Bhoobalan P.

 

 

 

 

 

 

Like 0

Like

1 comments

Hi Bhoobalan,

 

Please see this community post regarding the same question about ESQ and access rights - https://community.creatio.com/questions/access-issue-esq.

 

Best regards,

Oscar

Show all comments
lookup
Filtering
Filters
look up filters
section
7.17



Dear community,

 

When opening the Owner lookup on the contact page, the list is filtered by employees.

https://prnt.sc/111e40e

when we filter the contact page based on the owner lookup, the list is not filtered. Is this normal? What is the logic behind this, because we are unable to choose any of the non-employees contacts in the owner lookup.

How do we force this to only showing the employees?

https://prnt.sc/111e4qy

 

 

Kind regards,

Yosef

Like 0

Like

1 comments

Dear Yosef,

 

Thank you for your question!

 

It seems that the filter that you have applied is not fully set up.

Please refer to this screenshot as an example on how you can filter all Contacts by the Owner field:

 

In case you would need a separate look-up created for your purposes, we would recommend visiting this Academy Article:

https://academy.creatio.com/docs/user/setup_and_administration/system_s…

 

In addition, you may find some useful information about advanced filtering here:

https://academy.creatio.com/docs/user/platform_basics/business_data/fil…

 

Hope this was useful for you!

 

Thank you!

 

Regards,

Danyil 

Show all comments
custom quick filters
Filters
Sections
Studio_Creatio_enterprise_edition
7.17

Hi Community,

I've this situation where I need to get the value from a section quick filter and use it on another filter. For example, I've two quick filters one for the Accounts and other for Contacts. I want to filter the Contact Filter values based on the Account I've selected.

In other words, if the Account is "Teste1", my Contact Filter should return all the Contacts that belong to the "Teste1" Account.

 

Any sugestion on how to achieve this?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Like 3

Like

1 comments

Hi Pedro,

 

The logic of the drop-down list forming in the quick filter is stored in the CustomFilterViewModelV2 model inside the getLookupValueColumnList function. Your question cannot be solved easily since there is a need to override the module method logic completely and it's not recommended to do. I will create a problem for our R&D team so they could develop the logic of filtering the drop-down result of one filter condition based on the value of another filter condition.

 

Thank you for the idea and helping us in making the application better!

 

Best regards,

Oscar

Show all comments
datetimepicker
Filters
quick-filter
fixedfilter
ActivityPage

Hi Team,



I would like to change the week value in calendar activity.

By default we have Sunday to Monday, i need it to be displayed as Monday to Sunday.



Please find the attachment below,







we see that it is loaded from these modules FixedFilterViewModelV2,FixedFilterViewV2



in FixedFilterViewV2, getPeriodFixedButtonsViewConfig(Filtername) function generates the calendar icon buttons for current day, current week, current month filter and they are binded to "SetCurrentDayPeriod", "SetCurrentWeekPeriod" and month menu button collection correspondingly.

 

function getPeriodFixedButtonsViewConfig(filterName) {
			var localizableStrings = resources.localizableStrings;
			var localizableImages = resources.localizableImages;
			var dayButton = getFixedButtonBaseConfig({
				click: {bindTo: "setCurrentDayPeriod"},
				hint: localizableStrings.TodayCaption,
				imageConfig: localizableImages.DayPeriodButtonImage,
				markerValue: "day",
				classes: {
					wrapperClass: ["day-period-fixed-filter-wrapper-class"],
					imageClass: ["period-fixed-filter-image-class"]
				},
				visible: {bindTo: "dayButtonVisible"}
			});
			var weekButton = getFixedButtonBaseConfig({
				click: {bindTo: "setCurrentWeekPeriod"},
				hint: localizableStrings.CurrentWeekCaption,
				imageConfig: localizableImages.WeekPeriodButtonImage,
				markerValue: "week",
				classes: {
					wrapperClass: ["day-period-fixed-filter-wrapper-class"],
					imageClass: ["period-fixed-filter-image-class"]
				},
				visible: {bindTo: "weekButtonVisible"}
			});
			var monthButton = getFixedButtonBaseConfig({
				imageConfig: localizableImages.MonthPeriodButtonImage,
				hint: localizableStrings.SelectPeriodCaption,
				markerValue: "month",
				classes: {
					imageClass: ["period-fixed-filter-image-class"]
				},
				visible: {bindTo: "monthButtonVisible"}
			});
			monthButton.menu = {
				items: [{
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.YesterdayCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_Yesterday"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.TodayCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_Today"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.TomorrowCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_Tomorrow"
				}, {
					className: "Terrasoft.MenuSeparator"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.PastWeekCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_PastWeek"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.CurrentWeekCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_CurrentWeek"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.NextWeekCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_NextWeek"
				}, {
					className: "Terrasoft.MenuSeparator"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.PastMonthCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_PastMonth"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.CurrentMonthCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_CurrentMonth"
				}, {
					className: "Terrasoft.MenuItem",
					caption: localizableStrings.NextMonthCaption,
					click: {bindTo: "setPeriod"},
					tag: filterName + "_NextMonth"
				}]
			};
			return [dayButton, weekButton, monthButton];
		}

 

In FixedFilterViewModelV2 we see the below functions

 

        function setCurrentDayPeriod() {
			this.setPeriod("PeriodFilter_Today");
		}
 
		function setCurrentWeekPeriod() {
			this.setPeriod("PeriodFilter_CurrentWeek");
		}
 
		function setPeriod(tag) {
			if (!tag) {
				return;
			}
			var indexOfSeparator = tag.lastIndexOf("_");
			if (indexOfSeparator === -1) {
				return;
			}
			var filterName = tag.substring(0, indexOfSeparator);
			var periodName = tag.substring(indexOfSeparator + 1);
			var periodFilterConfig;
			Terrasoft.each(this.config.filters, function(filterConfig) {
				if (filterConfig.name === filterName) {
					periodFilterConfig = this.getPeriodFilterConfig(filterConfig);
				}
			}, this);
			if (!periodFilterConfig) {
				return;
			}
			var startDate = new Date();
			var dueDate;
			switch (periodName) {
				case "Yesterday":
					startDate = Terrasoft.startOfDay(Ext.Date.add(startDate, "d", -1));
					dueDate = Terrasoft.endOfDay(startDate);
					break;
				case "Tomorrow":
					startDate = Terrasoft.startOfDay(Ext.Date.add(startDate, "d", 1));
					dueDate = Terrasoft.endOfDay(startDate);
					break;
				case "PastWeek":
					startDate = Terrasoft.startOfWeek(Ext.Date.add(startDate, "d", -7));
					dueDate = Terrasoft.endOfWeek(startDate);
					break;
				case "CurrentWeek":
					startDate = Terrasoft.startOfWeek(startDate);
					dueDate = Terrasoft.endOfWeek(startDate);
					break;
				case "NextWeek":
					startDate = Terrasoft.startOfWeek(Ext.Date.add(startDate, "d", 7));
					dueDate = Terrasoft.endOfWeek(startDate);
					break;
				case "PastMonth":
					startDate = Terrasoft.startOfMonth(Ext.Date.add(startDate, "mo", -1));
					dueDate = Terrasoft.endOfMonth(startDate);
					break;
				case "CurrentMonth":
					startDate = Terrasoft.startOfMonth(startDate);
					dueDate = Terrasoft.endOfMonth(startDate);
					break;
				case "NextMonth":
					startDate = Terrasoft.startOfMonth(Ext.Date.add(startDate, "mo", 1));
					dueDate = Terrasoft.endOfMonth(startDate);
					break;
				default:
					startDate = Terrasoft.startOfDay(startDate);
					dueDate = Terrasoft.endOfDay(startDate);
					break;
			}
			this.suspendUpdate = true;
			this.set(periodFilterConfig.startDateColumnName, startDate);
			this.set(periodFilterConfig.dueDateColumnName, dueDate);
			this.suspendUpdate = false;
			if (this.filterChanged) {
				this.filterChanged();
			}
		}

In SetPeriod() function we call Terrasoft.startOfWeek & Terrasoft.endOfWeek based on Switch Case, which is responsible for sunday to Saturday filter display (calculations).



In DateUtils.js, we see the below

Terrasoft.utils.date.startOfWeek = function(dateValue) {
	var dateDiff = dateValue.getDay() + (1 - Terrasoft.Resources.CultureSettings.startDay);
	dateDiff = dateDiff ? 1 - dateDiff : -6;
	return Terrasoft.startOfDay(Ext.Date.add(dateValue, Ext.Date.DAY, dateDiff));
};
 
 
Terrasoft.utils.date.endOfWeek = function(dateValue) {
	var dateDiff = dateValue.getDay()  + (1 - Terrasoft.Resources.CultureSettings.startDay);
	dateDiff = dateDiff ? 7 - dateDiff : dateDiff;
	return Terrasoft.endOfDay(Ext.Date.add(dateValue, Ext.Date.DAY, dateDiff));
};





Please guide on how to replace or extend these modules and achieve a week value from "Sunday to Saturday into Monday to Sunday".



Note:

we could not replace these modules (FixedFilterViewModelV2,FixedFilterViewV2)

 by using "Replacing client Module", if we do so we get below error,

Please guide on how to extend and where to consume the extended module and procedure.







Thanks in Advance!

 





Regards,

Bhoobalan P.

Like 0

Like

6 comments

Hi Bhoobalan,

 

The beginning of the week is connected to the system user localization and as you correctly pointed the main logic is stored in the DateUtils.js file. The only way to modify this logic is to modify the content of two functions: startOfWeek and endOfWeek in the following manner:

Terrasoft.utils.date.startOfWeek = function(dateValue) {
    var dateDiff = dateValue.getDay() + (Terrasoft.Resources.CultureSettings.startDay);
    dateDiff = dateDiff ? 1 - dateDiff : -6;
    return Terrasoft.startOfDay(Ext.Date.add(dateValue, Ext.Date.DAY, dateDiff));
};
 
...
 
Terrasoft.utils.date.endOfWeek = function(dateValue) {
	var dateDiff = dateValue.getDay()  + (Terrasoft.Resources.CultureSettings.startDay);
	dateDiff = dateDiff ? 7 - dateDiff : dateDiff;
	return Terrasoft.endOfDay(Ext.Date.add(dateValue, Ext.Date.DAY, dateDiff));
};

Once done the application should be restarted, the application pool recycled and the Redis flushed. As a result the week will start on Monday as needed.

 

Best regards,

Oscar

Please also note that you won't be able to do that from the application UI and it should be done directly in the file (located at root_app_path\Terrasoft.WebApp\Resources\ui\Terrasoft\utils\common directory). If you want to do this in the cloud-based app you need to provide us with the file, directory and application name where this should be done.

 

UPD: logic described here won't work in the cloud based apps because of the bundling service in the cloud.

 

Best regards.

Oscar

And also you need to delete browser cookies for the website and clean cache in the browser so changes could be applied in the browser.

 

Best regards,

Oscar

Oscar Dylan,

Thanks much!

Hello Oleg Drobina,

 

I have indeed followed all the steps below but no changes have been reflected on the date calendar. Have you updated the procedure ever since ? 

 

Thanks,

Oleg Drobina,

Hi,

Is there any other solution for this topic?

Thanks.

Show all comments
Discussion
Filters
folders
dashboards

Hi Team, 

 

Let us have filters and folders on the main dashboard like we have it on section dashboards.  Ref #SR-0966586

0 comments
Show all comments
Filtering
Filters
filter
detail
Custom Details
products

Dear community,

 

We added a detail to our product page where we can add options.

These options are products as well so whenever we press on the "+" we get a popup with a muliselect where we can choose all the options:

https://prnt.sc/xtcr11

 

The problem here is that we can see all the options with different Categories.

How can we filter so it only shows the category that is the same as the product above it?

 

thank you!

 

 

Kind regards,

Yosef

Like 0

Like

3 comments

Hello Yosef,

You can add additional filters to the lookup for the detail by overriding the getAllLookupFilters method from the LookupMultiAddMixin, I have an article on how to do that here: https://customerfx.com/article/adding-additional-filters-to-a-detail-ad…

Ryan

As far as getting the product category from the parent record, I'm not sure that it would work to pass values to the detail (as outlined here https://customerfx.com/article/passing-values-from-a-page-to-a-new-reco…) for the case where the detail is using the LookupMultiAddMixin. Your best bet is to use the sandbox to request the current category value from the page.

Ryan

Ryan Farley,

Please help me to build filter for a few parametrs

So, it`s something wrong:

 

 

        getAllLookupFilters: function() {

                

                var filter = new this.Terrasoft.createFilterGroup();
                filter.logicalOperation = this.Terrasoft.LogicalOperatorType.AND;
                filter.add(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"ResponsibleDepartment" , this.get("Dept")));
                filter.add(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"Stage.End" , false));
                filterGroup.addItem(filter);
                
                return this.mixins.LookupMultiAddMixin.getAllLookupFilters.apply(this, arguments);

                
            
            },
 

 

 

Thank you

 

Show all comments
Filters
global search
mobile application
7.17
Mobile_Creatio

Hi all,

I am facing this issue with filter functionality in Mobile App. In previous version we used to have filter icon for section, and in the current version (7.17) that replaced with search based on the first field on the page.

Is there any workaround to apply filtered search? 

This kind of annoying, specially when searching for full name and it doesn't respond when you are typing last name. For example, 'John Doe' only appears in search if you search for 'John'. If you type 'Doe' it returns with no results.

Like 0

Like

4 comments
Best reply

Hello Kavian,

 

Hope you're doing well.

 

If I understood your question correctly, it seems that search functionality didn't change (we have compared the last version (7.17) and the previous one (7.16)) and we were able to get search results via looking for the part of the full name and full name (for section search and for filtered search):

 

7.16:

 

7.17:

 

You can use '%' sign for partial word search if you are not sure in the full name:

 

Also, it is possible to configure columns by which search will be performed in mobile application from your side. Information on where and how it can be configured can be found in the next post: https://community.creatio.com/articles/search-multiple-columns-mobile-a…

 

Best regards,

Roman

Hello Kavian,

 

Hope you're doing well.

 

If I understood your question correctly, it seems that search functionality didn't change (we have compared the last version (7.17) and the previous one (7.16)) and we were able to get search results via looking for the part of the full name and full name (for section search and for filtered search):

 

7.16:

 

7.17:

 

You can use '%' sign for partial word search if you are not sure in the full name:

 

Also, it is possible to configure columns by which search will be performed in mobile application from your side. Information on where and how it can be configured can be found in the next post: https://community.creatio.com/articles/search-multiple-columns-mobile-a…

 

Best regards,

Roman

Roman Rak,

Thanks.

Roman Rak,

On the other note, is it possible to define the which fields to filter based on? for example, currently, it shows all the fields been used on the contact page, but we are only looking for searching based on 'Last name' and 'Type'

 

Thanks

Hello Kavian,

 

Thank you for your question.

 

As for now, there is no such functionality. I have created the functional request to our R&D department about this case so they could consider enhancing the following functionality in the upcoming releases.

 

Best regards,

Roman

Show all comments
Fixed
Filters

Hi All,

 

Is there a way to call a function to set the default value for the fixed filter ?

 

I need to write a ESQ and set the value here .

 

 

Regards,

Sethuraghav N

 

Like 0

Like

1 comments

Hello,

 

Please check the example in this Community Post. It explains how to set default filtering conditions in the Account section by the Category field.

Please let us know if this helps!

 

Best regards,

Bogdan S.

Show all comments
Fixed
Filters

Hi Team,

 

I want hide the fixed filters in activity section (PFA) based on a condition . Is there a way to do it ?

 

Regards,

Sethuraghav N

Like 0

Like

2 comments

Hello Sethuraghav,



You may try to remove these filters: 

define("ActivitySectionV2", [], function() {
    return {
        entitySchemaName: "Activity",
        methods: {
            initFixedFiltersConfig: function () {
                var fixedFilterConfig = {
                    entitySchema: this.entitySchema,
                    filters: []
                };
                this.set("FixedFilterConfig", fixedFilterConfig);
            },
            getParticipants: function() {
                var quickFilterModuleId = this.getQuickFilterModuleId();
                var owners = this.sandbox.publish("GetFixedFilter", {filterName: "Owner"},
                    [quickFilterModuleId]);
                var participants = [];
                if (!Terrasoft.isEmptyObject(owners)) {
                    owners.forEach(function(item) {
                        if (item.value !== this.Terrasoft.SysValue.CURRENT_USER_CONTACT.value) {
                            participants.push(item);
                        }
                    });
                }
                return participants;
            }
        }
    };
});

There are more details described in this Academy Article.

 

Best regards,

Bogdan S

 

Bogdan Spasibov, can we do this based on a condition . I want to make this filter based on condition 

 

Show all comments
Complex
lookup
Filters

Edit : Solved by using the following:

			const filters = Ext.create("Terrasoft.FilterGroup");
 
			if(this.get("UsrFonctionDansInstance")) {
				var functionId = this.get("UsrFonctionDansInstance").value;
 
				var subFilters = Terrasoft.createFilterGroup();
				subFilters.addItem(Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "UsrFonctionsDansInstance", functionId)
				);
 
				var adminRef = "[UsrAdminContactFonctionInstanceCompte:UsrAccountType:Type]";
				filters.add(
					Terrasoft.createExistsFilter(adminRef + ".Id", subFilters)
				);
			}
 
			return filters;

Hi,

I struggle in order to implement a filter matching this query:

DECLARE @P1 uniqueidentifier = 'D21F0468-F86B-4707-9FDB-C093CF0F6F87';
 
Select Account.Name, AccountType.Name
 
from Account 
LEFT JOIN AccountType ON Account.TypeId = AccountType.Id
where exists
(
    Select SubUsrAdminContactFonctionInstanceCompte.Id
    FROM
    UsrAdminContactFonctionInstanceCompte [SubUsrAdminContactFonctionInstanceCompte] WITH(NOLOCK)
    Where 
    Account.TypeId = [SubUsrAdminContactFonctionInstanceCompte].UsrAccountTypeId
    AND [SubUsrAdminContactFonctionInstanceCompte].UsrFonctionsDansInstanceId = @P1
)

 

Anyone see matching filter path ?

 

 

 

Like 0

Like

1 comments

Hello Jerome, 



Thank you for sharing your solution here. 

Hope it will help other community users if they have the similar question. 



Kind regards,

Roman

Show all comments