cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Mobile development kit: Filter Usage

Former Member
0 Likes
1,495

Hi Guys,

currently I get familiar with the functionalities of the VSC-development with the MDK-extension for the SAP Asset Manager.

I tried to implement some filters and realized, that there are some restrictions, which I will describe in the next section:

In the Fiori Design Guidelines (https://experience.sap.com/fiori-design-ios/article/filter/), for filters, it is described, that one can use switches, list pickers, filter form cells and silders. In addition, the screenshot reveals, that date pickers can also be used for filtering.

That is why I tried to implement a filter with the type "datepicker" and "listpicker", but unfortunately, the method "parseFilterActionResult" of the script "SectionedTable.ts" is checking for either "isSorter()" or "isFilter()" and both date- and listpicker are not recognized as any of them.

1. So my first question is, whether date- and listpicker are defined as a filter so their outputs can be used for building a filter query. For me, if I used these types, I got the error: "TypeError: filterCriteria.isSorter is not a function".

2. Another question would be, if it is possible to build a filter query that can define a date range. I tried to build a filter, for which a user can select between current calendar weeks, but after checking the method "parseFilterActionResult", I realized, that it is only possible to build a query with "equals", "and" and "or". This method is not capable of filtering in a range such as (lower, lower or equal to and so on).

3. I checked the documentation on how to customize advanced rules with the MDK (https://help.sap.com/viewer/977416d43cd74bdc958289038749100e/Latest/en-US/bd5314e3a12c4d5e947298b5f0...). The documentation of the interface functions are described superficially. Is it possible to expect some more detailed definitions of these methods and functions in combination with use cases, in which they can be used and applied? Right now, one can only go through already implemented functions, but they are mostly too specific in their context and some general use case would be helpful for developing with the MDK in the future.

As a quick information about my setup, I downloaded the following files from SAP downloads:

-ASSET_MNGR_SDK00_0-80004962

-ASTMGRMETDTA00_0-80004961

-MDKCLNT01_0-80005072

-MDKPLGNSDKAND00_0-80004968

I used these files to build an application to debug my code and I edit the metadata in VSC.

Thank you in advance for your answers!

BR,

Sher-Chan Kodirov

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal78
Product and Topic Expert
Product and Topic Expert

sherchan_kodirov19

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert

Sher-Chan,

While the MDK utilizes the iOS and Android SDKs, not every control has been exposed within MDK. Specifically with filtering, that is one of the areas we are currently working on improving.

In answer to your questions...

1. Currently the automatic filters only support the two filter controls (sort and filter). We are working on adding list picker support in the next release and have plans to add support for the other control types in the future. However, you can implement this today, but will need to use a few rules (using data query builder) to set the target on your list based on the filter inputs.

2. We have a future roadmap item planned to add support for data query builder rules directly on the filter page that will allow you to write a rule to create the range criteria for use in the filter results. Again you can do it today with the current MDK but will have to use the method I mentioned above with the data query builder and rules to achieve it.

3. We are currently working on redesigned MDK API reference documentation. We will be including more examples for the various API functions in the documentation but those may not all be there when the redesign is first released, but we will continue to improve them as we go.

--Bill