{"id":567,"date":"2011-08-30T03:45:53","date_gmt":"2011-08-30T08:45:53","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=567"},"modified":"2016-10-20T10:22:46","modified_gmt":"2016-10-20T15:22:46","slug":"using-saved-searches-in-your-applications","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/general\/using-saved-searches-in-your-applications","title":{"rendered":"Saved Searches"},"content":{"rendered":"<p><!-- Begin Content --><\/p>\n<h1>Saved Searches<\/h1>\n<p>&nbsp;<\/p>\n<p>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:<\/p>\n<ol>\n<li class=\"padleft\">Choose all of their application selections at run-time (such as Record Selections, Sorting, and\/or even which levels to output).<\/li>\n<li class=\"padleft\">Click to Run\/Update their Application, based on their user input.<\/li>\n<li class=\"padleft\">They are then taken to their data output where they can verify their result set<\/li>\n<li class=\"padleft\">Click on the &quot;Options&quot; button, and save their current search for future use.<\/li>\n<\/ol>\n<p>Your users&#39; searches will be saved in one of two methods:<\/p>\n<ul>\n<li class=\"padleft\">In a configuration file on the m-Power Application Server (if Sign-on security is enabled).<\/li>\n<li class=\"padleft\">In a browser cookie on the client&#39;s device (if Sign-on security is disabled).<\/li>\n<\/ul>\n<p><strong>Configuration File<\/strong><\/p>\n<p>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&#39;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.<\/p>\n<p>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<\/p>\n<p>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&#39;s indication that this Saved Search is common, available for all users.<\/p>\n<p><strong>Browser Cookie<\/strong><\/p>\n<p>If you&#39;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&#39;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.<\/p>\n<h3>Installation<\/h3>\n<p>To implement in a data dictionary created after September 7th, 2011, simply compile your application.  At run-time, you will notice an &quot;Options&quot; button in your header.<\/p>\n<p>To implement in a data dictionary created before September 7th, 2011, follow these additional steps:<\/p>\n<ol>\n<li class=\"padleft\">Update your existing header file to include the new &quot;Options&quot; button. (This must be done in each Data Dictionary):\n<ol class=\"padleft3\">\n<li class=\"padleft3\">On your m-Power server, navigate to \\m-power\\proddata\\templates and open mrc_servlet_head.html<\/li>\n<li class=\"padleft3\">Copy lines 8 through 10 (The lines directly after <code>&lt;div id=\"LinkBar\"&gt;<\/code> and directly before <code>&lt;a href=\"mrc.Login?....\"&gt;<\/code>)<\/li>\n<li class=\"padleft3\">Open the m-Power interface and navigate to Admin &#8211;> Edit Data Dictionary Files &#8211;> Header File<\/li>\n<li class=\"padleft3\">Paste your copied code into this file in the same location as the original.  Be sure to save.<\/li>\n<\/ol>\n<\/li>\n<li class=\"padleft\">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.<\/li>\n<li class=\"padleft\">mrc recommends overwriting the HTML files for existing applications, however if that is not an option, within your application&#39;s presentation layer(s), copy and paste this code:<br \/>\n<code>&lt;!-- insert user_file=\"application_options.html\" here --&gt;<\/code><br \/>\ndirectly after this code:<br \/>\n<code>&lt;!-- End Title Bar --&gt;<\/code><\/li>\n<\/ol>\n<h3>Usage<\/h3>\n<p>To begin, click on the &quot;Options&quot; button in the top-right corner of your header.<\/p>\n<p><img decoding=\"async\" src=\"\/legacy\/images\/newoptionsbutton.jpg\" class=\"border\" \/><\/p>\n<p>Clicking on this option will display an interface that will allow users to do one of the following:<\/p>\n<p><img decoding=\"async\" src=\"\/legacy\/images\/savedsearches.jpg\" class=\"border\" \/><\/p>\n<ul>\n<li class=\"padleft\">Select a pre-Existing Saved Search by clicking on the Search&#39;s description.<\/li>\n<li class=\"padleft\">Delete a pre-Existing Saved Search by clicking on the &quot;Delete&quot; icon.<\/li>\n<li class=\"padleft\">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 &quot;Options&quot; button in the header, enter a name for your new Saved Search and click the &quot;Save&quot; icon.<\/li>\n<li class=\"padleft\">Change the output from PC, to either tablet or mobile output.<\/li>\n<li class=\"padleft\">Change the default language (only available for customers who have installed the m-Power translate Plug-in).<\/li>\n<\/ul>\n<p><strong>Notes:<\/strong><\/p>\n<ul>\n<li class=\"padleft\">Single Record Maintenance, Single Record Inquiry, and Summary applications do not support Saved Searches.<\/li>\n<li class=\"padleft\">Your application must be run before your search can be saved.  Specifically, you need to click the &quot;Filter&quot; or &quot;Run Report&quot; button prior to saving your search for the save to take effect.<\/li>\n<li class=\"padleft\">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.<\/li>\n<li class=\"padleft\">When a user clicks the &quot;Options&quot; 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.<\/li>\n<li class=\"padleft\">As a developer, if you wish to disable Saved Searches for a specific application, configure the &quot;Edit Properties&quot; for your application.  Set the &quot;Enable Saved Searches&quot; setting to No.<br \/>\n<strong>Note:<\/strong> Disabling this option will also remove the ability to change device-type output.<\/li>\n<p><img decoding=\"async\" src=\"\/legacy\/images\/togglesavedsearches.jpg\" class=\"border\" \/><\/p>\n<li class=\"padleft\">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:\n<ul>\n<li class=\"padleft3\">Interactive Reports &#8212; <code>&lt;input type=\"hidden\" name=\"is_IRT\" value=\"Y\" \/&gt;<\/code><\/li>\n<li class=\"padleft3\">Grid Maintenance &#8212; <code>&lt;input type=\"hidden\" name=\"isGrid\" value=\"Y\" \/&gt;<\/code><\/li>\n<li class=\"padleft3\">Standard Reports \/ Ranking Reports &#8212; A hidden field for each record selection, sequence key, and parameter calculation, where appropriate.  mrc support can supply more detailed information if necessary.<\/li>\n<li class=\"padleft3\">Pivot Table Report &#8212; 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.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!-- End Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Saved Searches &nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3571,"menu_order":18,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-567","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":13,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/567\/revisions"}],"predecessor-version":[{"id":2879,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/567\/revisions\/2879"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/3571"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}