Lookup with different quick filter options

Hello,



we need to improve lookup selection for several section. The main idea is to reduce quantity of records for selection, but still give user to search through full list.



We tried to use multiLookup feature to give 2 options: "All products" and "Active products" (like we select Account/Contact in the Order)



 

"UsrProductLookup": {
    "dataValueType": Terrasoft.DataValueType.LOOKUP,
    "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
    "multiLookupColumns": ["UsrProductA", "UsrProductB"],
    "caption": "Product",
    "onChange": "setProduct"
},
"UsrProductA": {
    "dataValueType": Terrasoft.DataValueType.LOOKUP,
    "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
    "isLookup": true,
    "referenceSchemaName": "Product"
},
"UsrProductB": {
    "dataValueType": Terrasoft.DataValueType.LOOKUP,
    "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
    "isLookup": true,
    "referenceSchemaName": "Product"
}

But then got an error, that we cannot use the same object for both lookups. 



message: Item with key "Product" Already exists 

date: Tue Oct 18 2022 02:01:40 GMT+0400 

moduleId: CardModuleV2_02b6b083-3cfa-4daf-a93c-632cb2420805_AccountPageV2_LookupPage

moduleName: MultiLookupModule



How is it possible to use multiLookup for this purpose? 

Or what alternative is for user-friendly quick filter in Lookup window?



Thank you.

Vladimir

Like 0

Like

4 comments

Hello Vladimir,



Please find the information about up filtering of lookup field values on a record page in this article

 

Bogdan,

thank you for link to Creatio basics.



But combination of quick filters (tabs in this case) gives possibility to search by second condition - by product name.



If you use search in lookup for one criteria (e.g. Inactive), you cannot search by another criteria - name. 

Besides, search in lookup requires much more actions (more than 4 clicks) comparing to 1 click in quick filter



That's why we are searching for smart solution



Kind regards,

Vladimir

Vladimir Sokolov,

 

We recommend creating a business rule on the page depending on a particular checkbox: if the checkbox is activated, then display the field in which the code filtering is implemented, if deactivated - hide the column with filtering in the code and show the column without filtering on the page.

 

You might need two columns so that you control the visibility of one depending on a particular checkbox. It can be achieved by using a business rule. 

 

Please try using the filters described in the article above for one column, and for the other one - do not apply the filters from the code (so that all Lookup records are displayed). This way, you may not use code elements as you just implement the business rule - filtering on the page.

Alla Blinova,

Thank you. Yes, we use solution with field and business rules, but customer should open lookup, search, then close lookup, change checkbox, open lookup again... 



Sometimes it can be acceptable, sometimes not. That's why we are looking for better option - to allow user change lookup filtration directly in lookup window. It can be a checkbox in lookup window or several predefined tabs. Maybe it sounds like an idea for future versions, maybe it is possible implement with current one



Kind regards,

Vladimir

Show all comments