on 2024 Nov 28 7:31 AM
Hi everyone,
I’m experiencing an issue with the search functionality in my dynamic object card collection. Despite having the search enabled set to true, the search feature doesn’t seem to be working. Whenever I try to search for something, it doesn’t return any results.
Has anyone else encountered this problem? Any suggestions or solutions would be greatly appreciated!
Thanks in advance!
Request clarification before answering.
There is not automatic search support for non-OData targets. Looking at your page def you are getting your data from ClientData. You can still implement search but will need to use a rule for your Target and do the filtering within the rule to return the filtered search results to be displayed.
The rule can access the searchstring and based on if that is populated do the necessary filtering of your ClientData list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I ran a test using the Android Emulator running a MDK 24.7.5 client and the Sample Service V4 in Mobile Services. I set the target for my Object Card Collection to bind to the Products entity set (offline mode) and enabled search on the collection. Search is working as expected for me in this scenario. Here is the Object Card section definition I am using.
{
"_Type": "Section.Type.ObjectCardCollection",
"Target": {
"Service": "/SCN_00041/Services/SampleServiceV4.service",
"EntitySet": "Products"
},
"_Name": "SectionObjectCardCollection0",
"Header": {
"_Type": "SectionCommon.Type.Header",
"_Name": "SectionCommonTypeHeader0",
"AccessoryType": "None",
"UseTopPadding": true,
"Caption": "Object Card Search Test"
},
"Visible": true,
"EmptySection": {
"FooterVisible": false
},
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": true,
"HeaderSeparator": true,
"FooterSeparator": true,
"ControlSeparator": true
},
"DataPaging": {
"ShowLoadingIndicator": false,
"PageSize": 50
},
"Card": {
"Visible": true,
"Title": "{Name}",
"Subhead": "{Category}",
"Footnote": "{ProductID}",
"DetailImage": "/SCN_00041/Services/SampleServiceV4.service/{@odata.readLink}/Picture",
"DetailImageIsCircular": false,
"Description": "{ShortDescription}",
"PrimaryAction": {
"OnPress": "/SCN_00041/Actions/SampleServiceV4/Products/NavToProducts_Detail.action",
"Title": "View",
"Visible": true
},
"SecondaryAction": {
"Title": "Secondary",
"Visible": false
},
"_Type": "Control.Type.ObjectCard"
},
"Search": {
"Enabled": true,
"Placeholder": "Product Search",
"BarcodeScanner": true,
"Delay": 500,
"MinimumCharacterThreshold": 3
},
"Layout": {
"LayoutType": "HorizontalScroll"
}
}If it is not working for you perhaps you can share your section metadata. Also, are you working with an online or offline odata service?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.