Multiselect detail - check already chosen records

Hi team,



I created a multi select lookup page for a detail in freedomUI using "crt.OpenLookupPageRequest" functionality. I wanted to either remove already selected records in the popup window or show them as checked if they are added into the detail. 

Source for multiselect page : https://customerfx.com/article/invoking-a-multi-select-lookup-dialog-on-a-creatio-freedom-ui-page/

Can anyone help me with this issue?



Expected functionality:





Thanks in advance

Goparna Nasina

Like 1

Like

1 comments

Hello!

You can use the filtersConfig parameter to filter records, as mentioned in the article.

Or you can use the option selectionState to predefine selected rows, which will be pre-selected when the lookup page is opened.

 

Example of selected records:

{
	type: "crt.OpenLookupPageRequest",
	...
	selectionState: {
		type: 'specific',
		selected: [
			'00000000-0000-0000-0000-000000000000',
			'11111111-1111-1111-1111-111111111111',
		]
	}
}

 

An example of pre-filtering records:

{
	type: "crt.OpenLookupPageRequest",
	...
	filtersConfig: {
		filterAttributes: [
			{
				name: 'MyFilter',
				loadOnChange: false
			}
		],
		attributesConfig: {
			MyFilter: {
				value: {
					"items": {
						"29e16d42-36f1-4e04-9029-4321cbb2494d": {
							"filterType": 1,
							"comparisonType": 11,
							"isEnabled": true,
							"trimDateTimeParameterToDate": false,
							"leftExpression": {
								"expressionType": 0,
								"columnPath": "Name"
							},
							"isAggregative": false,
							"dataValueType": 1,
							"rightExpression": {
								"expressionType": 2,
								"parameter": {
									"dataValueType": 1,
									"value": "Super"
								}
							}
						}
					},
					"logicalOperation": 0,
					"isEnabled": true,
					"filterType": 6,
					"rootSchemaName": "Contact"
				}
			}
		}
	}
}

 

Show all comments