Overview
This feature allows end-users will have the ability to save their run-time/ad-hoc application options for subsequent use. Users will love this enhancement as it will allow them to bypass entering the same searching/sorting options multiple times on any given application. Instead, users simply do the following:
- Choose all of their application selections at run-time (such as filters, Sorting, and/or even which levels to output).
- Click to Run/Update their Application, based on their user input.
- They are then taken to their data output where they can verify their result set
- Click the “Save” button and save their current search for future use.
Your users’ searches will be saved in one of two methods:
- In a configuration file on the m-Power Application Server (if Sign-on security is enabled).
- In a browser cookie on the client’s device (if Sign-on security is disabled).
Runtime Usage
To begin, click on the “Save” button on the top-right side of your application

Clicking on this option will display a popup that will allow users to do one of the following:

- Select a pre-Existing Saved Search by clicking on the Search’s description.
- Delete a pre-Existing Saved Search by clicking on the “X” icon.
- Create a Saved Search based on currently used criteria by running your Report/Retrieval/Maintenance application as you normally would. Once you have verified the result set, click on the “Save” button, enter a name for your new Saved Search and click the green “Save” button.
Browser Cookie
If you’ve opted to not require end users to Sign-on to access m-Power applications, we will not store saved searches on the m-Power server. Instead, all Saved Searches will be stored on the user’s local device (PC, tablet, mobile), via a browser cookie. The user will be able to reuse their Saved Search, but only when accessing the application from the same device the search was originally saved.
Configuration File
If mrc Sign-on logic has been enabled, m-Power will have knowledge of who the end user is that is running the application. Since m-Power is aware of the user, we can save this user’s request on the m-Power application server. Saving this information on the server is a wonderful advantage as it allows a user to access this saved search from any other device. As long as they log in, they will be able to view their saved searches.
All saved searches, across all dictionaries, are stored in an .xml file on the m-Power application server. The path to this file is \m-power\mrcjava\WEB-INF\classes\mrc-app-views.xml
Admin Management
m-Power administrators can access a dedicated Saved Search management screen to view and alter user searches. Open this screen via the following URL:
[MPOWERSERVER:PORT]/mrcjava/servlet/saved-searches
Any searches saved by users will be listed here. From this interface, you can:
- Filter: Filter the list by app, user, or view name.
- Reassign: Change the user a view is available for by modifying the username.
- Make Global: Check the box to make the saved search global for all users. (To undo a global search, simply type the user name).
- Delete: Delete a view as needed by clicking the trash icon.
- Copy: To copy a saved search for another user, click the copy button and type the new user’s name.
Securing the Admin Screen
Because this is an admin-level screen being accessed via runtime, mrc highly recommends installing this feature behind a secure login to limit unauthorized user access.
To protect the management screen:
- Edit your
/m-power/mrcjava/WEB-INF/web.xmlfile in a text-based editor on your server. - Locate the
</web-app>tag at the very end of the document. - Directly above this tag, insert the following security constraint:
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Saved Search Management</web-resource-name>
<url-pattern>/servlet/saved-searches</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager-gui</role-name>
</auth-constraint>
</security-constraint>
Save your file and restart Tomcat.
Notes
- Single Row Data List, Single Row Web Form, and Summary applications do not support Saved Searches.
- Your application must be run before your search can be saved. Specifically, you need to click the “Filter” or “Run Report” button prior to saving your search for the save to take effect.
- The first time you promote an application with Saved Search to production, the \m-power\mrcjava\WEB-INF\classes\mrc-app-views.xml will need to be promoted. This only needs to be done once and should not be re-promoted. Doing so would cause the loss of existing Saved Searches.
- As a developer, if you wish to disable Saved Searches for a specific application, configure the “App Properties” for your application. Set the “Saved Searches” setting to No.
