{"id":567,"date":"2011-08-30T03:45:53","date_gmt":"2011-08-30T08:45:53","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?page_id=567"},"modified":"2026-08-13T15:50:20","modified_gmt":"2026-08-13T20:50:20","slug":"using-saved-searches-in-your-applications","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/using-saved-searches-in-your-applications","title":{"rendered":"Saved Searches"},"content":{"rendered":"\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"> <i>Click <a href=\"\/legacy\/general\/using-saved-searches-in-your-applications\">here<\/a> to access legacy documentation for this feature<\/i> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">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\n\n\n<ol class=\"wp-block-list\">\n<li>Choose all of their application selections at run-time (such as filters, Sorting, and\/or even which levels to output).<\/li>\n\n\n\n<li>Click to Run\/Update their Application, based on their user input.<\/li>\n\n\n\n<li>They are then taken to their data output where they can verify their result set<\/li>\n\n\n\n<li>Click the &#8220;Save&#8221; button and save their current search for future use.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Your users&#8217; searches will be saved in one of two methods:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In a configuration file on the m-Power Application Server (if Sign-on security is enabled).<\/li>\n\n\n\n<li>In a browser cookie on the client&#8217;s device (if Sign-on security is disabled).<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Runtime Usage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To begin, click on the &#8220;Save&#8221; button on the top-right side of your application<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/vue-images\/newoptionsbutton.png\"><img decoding=\"async\" src=\"\/docs\/vue-images\/newoptionsbutton.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Clicking on this option will display a popup that will allow users to do one of the following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/vue-images\/savedsearches.png\"><img decoding=\"async\" src=\"\/docs\/vue-images\/savedsearches.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select a pre-Existing Saved Search by clicking on the Search&#8217;s description.<\/li>\n\n\n\n<li>Delete a pre-Existing Saved Search by clicking on the &#8220;X&#8221; icon.<\/li>\n\n\n\n<li>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 &#8220;Save&#8221; button, enter a name for your new Saved Search and click the green &#8220;Save&#8221; button.<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\"><strong>Browser Cookie<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;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&#8217;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<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Configuration File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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&#8217;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\n\n\n<p class=\"wp-block-paragraph\">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<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Admin Management<sup><\/sup><sup><\/sup><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">m-Power administrators can access a dedicated Saved Search management screen to view and alter user searches. Open this screen via the following URL:<sup><\/sup><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[MPOWERSERVER:PORT]\/mrcjava\/servlet\/saved-searches<\/code><\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\"><strong>Note:<\/strong> This screen should be run directly from your production port so it will accurately edit the production saved searches.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Any searches saved by users will be listed here. From this interface, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Filter:<\/strong> Filter the list by app, user, or view name.<\/li>\n\n\n\n<li><strong>Reassign:<\/strong> Change the user a view is available for by modifying the username.<\/li>\n\n\n\n<li><strong>Make Global:<\/strong> Check the box to make the saved search global for all users. <em>(To undo a global search, simply type the user name).<\/em><\/li>\n\n\n\n<li><strong>Delete:<\/strong> Delete a view as needed by clicking the trash icon.<\/li>\n\n\n\n<li><strong>Copy:<\/strong> To copy a saved search for another user, click the copy button and type the new user&#8217;s name.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Securing the Admin Screen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To protect the management screen:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Edit your <code>\/m-power\/mrcjava\/WEB-INF\/web.xml<\/code> file in a text-based editor on your server.<\/li>\n\n\n\n<li>Locate the <code>&lt;\/web-app&gt;<\/code> tag at the very end of the document.<\/li>\n\n\n\n<li>Directly <strong>above<\/strong> this tag, insert the following security constraint:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;security-constraint&gt;\n  &lt;web-resource-collection&gt;\n    &lt;web-resource-name&gt;Protected Saved Search Management&lt;\/web-resource-name&gt;\n    &lt;url-pattern&gt;\/servlet\/saved-searches&lt;\/url-pattern&gt;\n  &lt;\/web-resource-collection&gt;\n  &lt;auth-constraint&gt;\n    &lt;role-name&gt;manager-gui&lt;\/role-name&gt;\n  &lt;\/auth-constraint&gt;\n&lt;\/security-constraint&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save your file and restart Tomcat.<\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Credentials for valid users (who possess the manager-gui role) can be found in \/m-power\/tomcat\/conf\/tomcat-users.xml.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Notes<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Single Row Data List, Single Row Web Form, and Summary applications do not support Saved Searches.<\/li>\n\n\n\n<li>Your application must be run before your search can be saved. Specifically, you need to click the &#8220;Filter&#8221; or &#8220;Run Report&#8221; button prior to saving your search for the save to take effect.<\/li>\n\n\n\n<li>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 <strong>should not be re-promoted<\/strong>. Doing so would cause the loss of existing Saved Searches.<\/li>\n\n\n\n<li>As a developer, if you wish to disable Saved Searches for a specific application, configure the &#8220;App Properties&#8221; for your application. Set the &#8220;Saved Searches&#8221; setting to No.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/vue-images\/togglesavedsearches.jpg\"><img decoding=\"async\" src=\"\/docs\/vue-images\/togglesavedsearches.jpg\" alt=\"\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>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: Your users&#8217; searches&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[266],"ht-kb-tag":[],"class_list":["post-567","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-general"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":22,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/567\/revisions"}],"predecessor-version":[{"id":15300,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/567\/revisions\/15300"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=567"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}