Hello. In the old interface, we had a filter that filtered the Contact field by the Contact's Career field. Accordingly, when the Account field is filled in, the system will display in the contact directory only those who have this Account in the Career. Here is the code:
"Contact": {
"FiltrationContactByAccount": {
"ruleType": BusinessRuleModule.enums.RuleType.FILTRATION,
"autocomplete": true,
"autoClean": true,
"baseAttributePatch": "[ContactCareer:Contact].Account",
"comparisonType": Terrasoft.ComparisonType.EQUAL,
"type": BusinessRuleModule.enums.ValueType.ATTRIBUTE,
"attribute": "Account"
I am currently trying to recreate this filtering in Freedom UI in a test application. Has anyone already implemented such functionality?
Here is the code for the test application:
define("UsrTestAPP_FormPage", /**SCHEMA_DEPS*/[]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/()/**SCHEMA_ARGS*/ {
return {
viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[
{
"operation": "merge",
"name": "Feed",
"values": {
"dataSourceName": "PDS",
"entitySchemaName": "UsrTestAPP"
}
},
{
"operation": "merge",
"name": "AttachmentList",
"values": {
"columns": [
{
"id": "5eaa61fa-469c-4905-9f83-b058775049e5",
"code": "AttachmentListDS_Name",
"caption": "#ResourceString(AttachmentListDS_Name)#",
"dataValueType": 28,
"width": 200
}
]
}
},
{
"operation": "insert",
"name": "UsrName",
"values": {
"layoutConfig": {
"column": 1,
"row": 1,
"colSpan": 1,
"rowSpan": 1
},
"type": "crt.Input",
"label": "$Resources.Strings.UsrName",
"control": "$UsrName",
"labelPosition": "auto"
},
"parentName": "SideAreaProfileContainer",
"propertyName": "items",
"index": 0
},
{
"operation": "insert",
"name": "ComboBox_yee7dcu",
"values": {
"layoutConfig": {
"column": 1,
"row": 2,
"colSpan": 1,
"rowSpan": 1
},
"type": "crt.ComboBox",
"label": "$Resources.Strings.PDS_UsrColumn3_r9ta6ih",
"labelPosition": "auto",
"control": "$PDS_UsrColumn3_r9ta6ih",
"listActions": [],
"showValueAsLink": true,
"controlActions": []
},
"parentName": "SideAreaProfileContainer",
"propertyName": "items",
"index": 1
},
{
"operation": "insert",
"name": "addRecord_wpani58",
"values": {
"code": "addRecord",
"type": "crt.ComboboxSearchTextAction",
"icon": "combobox-add-new",
"caption": "#ResourceString(addRecord_wpani58_caption)#",
"clicked": {
"request": "crt.CreateRecordFromLookupRequest",
"params": {}
}
},
"parentName": "ComboBox_yee7dcu",
"propertyName": "listActions",
"index": 0
},
{
"operation": "insert",
"name": "ComboBox_sg63k40",
"values": {
"layoutConfig": {
"column": 1,
"row": 3,
"colSpan": 1,
"rowSpan": 1
},
"type": "crt.ComboBox",
"label": "$Resources.Strings.PDS_UsrColumn2_05dsooo",
"labelPosition": "auto",
"control": "$PDS_UsrColumn2_05dsooo",
"listActions": [],
"showValueAsLink": true,
"controlActions": []
},
"parentName": "SideAreaProfileContainer",
"propertyName": "items",
"index": 2
},
{
"operation": "insert",
"name": "addRecord_j2jwfn4",
"values": {
"code": "addRecord",
"type": "crt.ComboboxSearchTextAction",
"icon": "combobox-add-new",
"caption": "#ResourceString(addRecord_j2jwfn4_caption)#",
"clicked": {
"request": "crt.CreateRecordFromLookupRequest",
"params": {}
}
},
"parentName": "ComboBox_sg63k40",
"propertyName": "listActions",
"index": 0
}
]/**SCHEMA_VIEW_CONFIG_DIFF*/,
viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
{
"operation": "merge",
"path": [
"attributes"
],
"values": {
"UsrName": {
"modelConfig": {
"path": "PDS.UsrName"
}
},
"PDS_UsrColumn2_05dsooo": {
"modelConfig": {
"path": "PDS.UsrTestContact"
}
},
"PDS_UsrColumn3_r9ta6ih": {
"modelConfig": {
"path": "PDS.UsrTestAccount"
}
}
}
},
{
"operation": "merge",
"path": [
"attributes",
"Id",
"modelConfig"
],
"values": {
"path": "PDS.Id"
}
},
]/**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/,
modelConfigDiff: /**SCHEMA_MODEL_CONFIG_DIFF*/[
{
"operation": "merge",
"path": [],
"values": {
"primaryDataSourceName": "PDS"
}
},
{
"operation": "merge",
"path": [
"dataSources"
],
"values": {
"PDS": {
"type": "crt.EntityDataSource",
"config": {
"entitySchemaName": "UsrTestAPP"
},
"scope": "page"
}
}
}
]/**SCHEMA_MODEL_CONFIG_DIFF*/,
handlers: /**SCHEMA_HANDLERS*/[]/**SCHEMA_HANDLERS*/,
converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,
validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/
};
});
I apologize right away if I phrased the question incorrectly, I'm not a programmer =(