Hi Team,
We are currently working on adding a filter to a custom section within our mobile application. The object has a lookup column named "Community," and our goal is to filter the records such that the "Community" value matches the current user's associated community. The relevant field on the "Contact" object is the "Primary Community."
We are familiar with the process of applying filters to mobile app sections by leveraging the out-of-the-box (OOTB) features of Creatio to configure the web page and then merging the generated code into the mobile app page. However, the specific condition involving the current user’s community seems to present a more complex challenge.
We would greatly appreciate any guidance or suggestions you may have for implementing this filter condition efficiently.
Like
Hello,
Could you tell me if your question is about the Freedom UI or Classic UI section?
Serhii Parfentiev,
Hi Serhii,
Thank you for your response!
My question is related to the Freedom UI section.
Hello!
Currently, this functionality is not available in the standard Creatio solution and we have a task to implement quick filters in the Creatio mobile app for the R&D team.
As a workaround, to achieve your goal, you can try the following approach, in which a quick filter is added to the page by the “Community” column and the user can select the appropriate value:
Here is an example of code for page MobileCalendar_ListPage for filter on first tab
1) changes in viewConfig -
"type" : "crt.Screen",
"header": [{
"name": "My_QuickFilter",
"type": "crt.QuickFilter",
"filterType": "lookup",
"config": {
"caption": "Community",
"icon": "person-button-icon",
"iconPosition": "left-icon",
"entitySchemaName": "Community"
}
}],
2) changes in viewModelConfig -
"viewModelConfig" : {
"attributes" : {
"My_Converter_Arg3": {
"value": {
"quickFilterType": "lookup",
"target": {
"viewAttributeName": "Items3",
"filterColumn": "Community"
}
}
},
"My_Filter3": {
"from": "My_QuickFilter_Value",
"converter": "crt.QuickFilterAttributeConverter : $My_Converter_Arg3"
},
3) set filter for your collection in viewModelConfig -
"Items3" : {
"modelConfig" : {
"path" : "Tab1DetailDS",
"filterAttributes" : [
...........,
{
"loadOnChange": true,
"name": "My_Filter3"
}
]
},
....
}