cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDK rule not triggered in List Picker search to handle case sensitive search

learner1
Explorer
0 Kudos

Hi,

Can anyone help me with this?

List picker is bound to the rule to return the list picker items, I have search enabled in the list picker to filter the values. When I type a char in the list picker to filter list of the items, only exact matches are returning. 

For ex. List has "Electronics", if I type "elect" it's not retuning any value. If the rule is triggered on char type I can handle the search but its not happening.

Page and rule are below.

{
	"Controls": [
		{
			"_Type": "Control.Type.SectionedTable",
			"_Name": "SectionedTable0",
			"Sections": [
				{
					"Visible": true,
					"EmptySection": {
						"FooterVisible": false
					},
					"Separators": {
						"TopSectionSeparator": false,
						"BottomSectionSeparator": true,
						"HeaderSeparator": true,
						"FooterSeparator": true,
						"ControlSeparator": true
					},
					"_Type": "Section.Type.FormCell",
					"_Name": "SectionFormCell0",
					"Controls": [
						{
							"_Type": "Control.Type.FormCell.ListPicker",
							"_Name": "FormCellListPicker0",
							"IsVisible": true,
							"Separator": true,
							"AllowMultipleSelection": true,
							"AllowEmptySelection": true,
							"Caption": "Categories",
							"DataPaging": {
								"ShowLoadingIndicator": false,
								"PageSize": 50
							},
							"PickerPrompt": "Please select one single item",
							"IsSelectedSectionEnabled": false,
							"IsPickerDismissedOnSelection": false,
							"IsSearchCancelledAfterSelection": false,
							"AllowDefaultValueIfOneItem": false,
							"IsEditable": true,
							"Search": {
								"Enabled": true
							},
							"PickerItems": "/TestPicker/Rules/LoadList.js"
						}
					]
				}
			],
			"FilterFeedbackBar": {
				"ShowAllFilters": false,
				"_Type": "Control.Type.FilterFeedbackBar"
			}
		}
	],
	"_Type": "Page",
	"_Name": "TestListPkrWithRule",
	"Caption": "TestListPkrWithRule",
	"PrefersLargeCaption": true
}

Rule:

/**
 * Describe this function...
 * @param {IClientAPI} clientAPI
 */
export default function LoadList(clientAPI) {
    return [
        {
          "DisplayValue": "Electronics",
          "ReturnValue": "ELE100"
        },
        {
          "DisplayValue": "Electricals",
          "ReturnValue": "ELE200"
        },
        {
          "DisplayValue": "Furniture",
          "ReturnValue": "FUR"
        }
      ];
}

 @bill_froelich any idea this works in MDK? or any other param in the page that I missed?

View Entire Topic
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert

What platform are you seeing this issue? Android or iOS or both?

What MDK version you are currently on? e.g. 23.12.0

I tested the details you shared below on both iOS and Android (public store client) and see the expected results when searching. 

Screenshot 2024-03-04 at 11.32.59.png

bill_froelich
Product and Topic Expert
Product and Topic Expert
A also tested with 23.8.7 and see the expected results without needing to do anything special using your page and rule
learner1
Explorer
0 Kudos
Yes, its working in device issue is with Web only. I will accept it as answered. Thanks.