Skip to Content
Technical Articles
Author's profile photo Bill Froelich

Persist User Defined Filters using MDK 6.1

With the release of MDK 6.1, we introduce support for programmatic filters in Object Tables.  In this blog post, we will look at how this feature can be used to add persistent filters into your MDK application.  With persistent filters, any filter that a user sets for the Object Table list page is stored so that the next time the page is opened, their previous filter choices are automatically applied.

You can read all about the new MDK 6.1 features in the What’s new in Mobile development kit client 6.1 blog post.

To aid you with implementing persistent filters, we have now added a new MDK Showcase app: Persistent Filters App, which demonstrates the feature.

With this showcase app, you will learn how to implement to the following functionality:

  1. Save the current filter to App Settings – App Settings is used instead of Client Data so that the filter value will be retained even if the application is closed and relaunched.
  2. Use the new Section Table filter property to define the default filter for the Object Table
  3. Load the current filter from App Settings and convert to a Filter Criteria Array

The showcase app works across all three MDK platforms (iOS, Android and Web).  There are short demos of all three platforms on the app page in the Samples repo.

We will be creating more blog posts like this to introduce other showcase apps to help you learn to make the best use of MDK in developing your apps.

Feel free to add your thoughts and feedback in the comments section.  If you have any questions about MDK in general, please visit the Q&A section in the mobile development kit SAP Community and post your questions.

All the apps in the SAP Mobile Development Kit Samples repository are made available under the SAP Sample Code license, which essentially means they are provided as-is, no warranties. Feel free to grab a copy and reuse the portions of the app that seem useful to you.

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo julio silva
      julio silva

      Hi Bill Froelich, thank you for the post regarding the new features of MDK 6.1.

      Is there any way to perform persistent filtering on previous versions of MDK? Like MDK 6.0.7, for instance. we need to apply some filters that need to be stored trough sessions on SAP Asset Manager 2110 but it only supports MDK 6.0.x, for now at least.

      Thank you for your attention.

      Author's profile photo Bill Froelich
      Bill Froelich
      Blog Post Author

      Unfortunately the feature that supports applying the filters was introduced in MDK 6.1 so you need to at least be on that version.  You might reach out to the SAM team about their plans for MDK 6.1 or later support.

      Author's profile photo julio silva
      julio silva

      Humm, I understand, let's see if we can apply anything that can manage this issue.

      Thank you very much for the quick response.