Saved Searches
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 Record Selections, 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 on the "Options" 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).
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
m-Power administrators can create Saved Searches that are global for all users by editing this file directly on the m-Power server by removing the user name value from a given search. When a search has a blank user name, this is m-Power's indication that this Saved Search is common, available for all users.
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.
Installation
To implement in a data dictionary created after September 7th, 2011, simply compile your application. At run-time, you will notice an "Options" button in your header.
To implement in a data dictionary created before September 7th, 2011, follow these additional steps:
- Update your existing header file to include the new "Options" button. (This must be done in each Data Dictionary):
- On your m-Power server, navigate to \m-power\proddata\templates and open mrc_servlet_head.html
- Copy lines 8 through 10 (The lines directly after
<div id="LinkBar">
and directly before<a href="mrc.Login?....">
) - Open the m-Power interface and navigate to Admin –> Edit Data Dictionary Files –> Header File
- Paste your copied code into this file in the same location as the original. Be sure to save.
- Newly created applications will now work properly, however if you would like to use the Saved Search functionality on an existing application, it will need to be recompiled.
- mrc recommends overwriting the HTML files for existing applications, however if that is not an option, within your application's presentation layer(s), copy and paste this code:
<!-- insert user_file="application_options.html" here -->
directly after this code:
<!-- End Title Bar -->
Usage
To begin, click on the "Options" button in the top-right corner of your header.
Clicking on this option will display an interface 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 "Delete" 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 "Options" button in the header, enter a name for your new Saved Search and click the "Save" icon.
- Change the output from PC, to either tablet or mobile output.
- Change the default language (only available for customers who have installed the m-Power translate Plug-in).
Notes:
- Single Record Maintenance, Single Record Inquiry, 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.
- When a user clicks the "Options" button, a common file is referenced which allows users to view existing Saved Searches and change output types. This file is located here: \m-power\mrcjava\WEB-INF\classes\DATADICTIONARY\application_options.html. There is also a file for tablet (application_options_tablet.html) and mobile (application_options_mobile.html) devices. These files can be customized and also must be promoted to production.
- As a developer, if you wish to disable Saved Searches for a specific application, configure the "Edit Properties" for your application. Set the "Enable Saved Searches" setting to No.
Note: Disabling this option will also remove the ability to change device-type output. - If electing to add saved search functionality to existing applications without overwriting the HTML, please be aware that the following hidden fields are necessary for the following templates:
- Interactive Reports —
<input type="hidden" name="is_IRT" value="Y" />
- Grid Maintenance —
<input type="hidden" name="isGrid" value="Y" />
- Standard Reports / Ranking Reports — A hidden field for each record selection, sequence key, and parameter calculation, where appropriate. mrc support can supply more detailed information if necessary.
- Pivot Table Report — Since numerous hidden fields will be needed, mrc recommends replacing the current HTML presentation layer. If this is not possible, mrc support can supply more detailed information.
- Interactive Reports —