{"id":5646,"date":"2013-07-15T10:34:12","date_gmt":"2013-07-15T15:34:12","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?page_id=5646"},"modified":"2024-06-12T10:27:18","modified_gmt":"2024-06-12T15:27:18","slug":"filters","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/filters","title":{"rendered":"Filters"},"content":{"rendered":"\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><em>Click <a href=\"https:\/\/www.mrc-productivity.com\/legacy\/m-power-build-process\/record-selections\">here<\/a> to access legacy documentation for this feature<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>Filters can be used to display subsets of data in an application. For instance, imagine a retrieval built over a sales history table with over 100,000 records. It is not always practical to show all 100,000 records at one time. Perhaps an end-user needs to be able to select a particular date range, or the data needs to be secured so that employees in different departments can only access specific sales records. Filters make these types of tasks possible.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Filtering in m-Power: Learn how to Group for Maximum Efficiency\" width=\"643\" height=\"362\" src=\"https:\/\/www.youtube.com\/embed\/V3QtV_2Z5_U?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>When first accessing the Filter specification screen, you will be brought to a listing of existing filters for the selected application. From this page you can edit, delete, or reorder any existing filters. <\/p>\n\n\n\n<p>Additionally, you can create a new filter by clicking on the &#8220;Add Filter&#8221; button. Clicking &#8220;Add Filter&#8221; will open the following screen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/record_selections.png\"><img decoding=\"async\" src=\"\/docs\/images\/newfilter1.jpg\" alt=\"filters\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Filter Type<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/images\/newfilter4.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Prior to making any filtering choices, first choose what type of filter you want to create.<\/p>\n\n\n\n<p>Choices include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hard-Coded Value &#8212; This means that the developer will be specifying a specific value(s) within the application.<\/li>\n\n\n\n<li>Prompt at Runtime (available in reports\/summaries) &#8212; Developers can defer the filtering choice to the end-user at runtime.<\/li>\n\n\n\n<li>Row Level Security &#8212; Utilize user-specific data to add security this application, ensuring that the end-user can only see data applicable to him\/her.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Filter on Field<\/h2>\n\n\n\n<p>Select the desired field. This list is populated by all fields currently selected in the application build process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Relation<\/h2>\n\n\n\n<p>Select the desired relationship:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/relationship.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/relationship.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Filtering on Dates<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/images\/pop\/relationDropdown.png\"><img decoding=\"async\" src=\"\/docs\/images\/pop\/relationDropdown.png\" alt=\"relation dropdown\"\/><\/a><\/figure>\n\n\n\n<p>When a true date field is selected as the filter field, new date specific options become available for the relationship dropdown. Common date values include today, yesterday, this month, etc. <\/p>\n\n\n\n<p>To allow the end-user to perform runtime period analytics where they can compare date ranges against one another, use the &#8216;Period Analysis&#8217; relationship. Full documentation on this feature can be found <a rel=\"noreferrer noopener\" href=\"\/docs\/reports\/period-analysis\" target=\"_blank\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Value Type<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Constant Value<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/vue-images\/recsel1.jpg\"><img decoding=\"async\" src=\"\/docs\/vue-images\/recsel1.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>The &#8220;Constant Value&#8221; option is the basic Filter screen. By default, when creating any application you will have the option, as developer, of specifying a constant value as a filter for this application. <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">The &#8220;Constant Value&#8221; filter type cannot be modified by your end-user.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Application Field Value<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/vue-images\/recsel2.jpg\"><img decoding=\"async\" src=\"\/docs\/vue-images\/recsel2.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>The &#8220;Application Field Value&#8221; option allows you, as a developer, to specify a filter by comparing one field in your application to another field. You can only compare like fields (Numeric to Numeric, Alpha to Alpha, etc.). In addition, only certain relationships will allow this comparison option. When a relationship is not allowed, &#8220;Application Field Value&#8221; will be removed from the Value drop-down option.<\/p>\n\n\n\n<p>The relationships that allow this comparison are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Equal<\/li>\n\n\n\n<li>Not Equal<\/li>\n\n\n\n<li>Greater than<\/li>\n\n\n\n<li>Greater than or Equal to<\/li>\n\n\n\n<li>Less than<\/li>\n\n\n\n<li>Less than or Equal to<\/li>\n\n\n\n<li>Not greater than<\/li>\n\n\n\n<li>Not less than<\/li>\n\n\n\n<li>Contains<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">The &#8220;Application Field Value&#8221; filter cannot be modified by your end-user.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prompt at Runtime<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/recsel3.jpg\"><img decoding=\"async\" src=\"\/docs\/images\/newfilter2.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>The final option you have for filters as a developer is to allow the end-user to decide at runtime what their filter should be. This option is called &#8220;Prompt at Runtime&#8221;. <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">The &#8220;Prompt at Runtime&#8221; option is only available when creating Reports or Summaries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Value<\/h2>\n\n\n\n<p>Enter a value, as necessary.<\/p>\n\n\n\n<p>If choosing &#8220;Constant Value&#8221;, input a value. This value, which the end user cannot change, will be compared to the field based on the relationship chosen. <\/p>\n\n\n\n<p>Choosing &#8220;Application Field Value&#8221; will allow you to select another field in your application to compare against the previously selected field. <\/p>\n\n\n\n<p>If you would like your end-user to have the option of inputting a value at runtime, click &#8220;Prompt at Runtime&#8221;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"defaultValue\">Default Value<\/h3>\n\n\n\n<p>When utilizing the &#8220;Prompt at Runtime&#8221; option for filters, you have the option of defaulting a value. At runtime, the entered default value will display in the runtime filter input. The end-user has the option of changing this value if wanted. If using run=2 and <em>not<\/em> specifying a value for the filter, the default value will be used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">And\/Or<\/h2>\n\n\n\n<p>Select &#8220;And&#8221; if you would like the the application to be filtered by the current filter and the subsequent filters. Select &#8220;Or&#8221; if you would like the application to be filtered by either filter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reordering &amp; Grouping<\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Filtering in m-Power: Learn how to Group for Maximum Efficiency\" width=\"643\" height=\"362\" src=\"https:\/\/www.youtube.com\/embed\/V3QtV_2Z5_U?start=72&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">WHERE or HAVING<\/h2>\n\n\n\n<p>Applicable only to report templates, you have the ability to specify your filter as a HAVING filter, rather than the default WHERE clause.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/images\/newfilter3.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>HAVING allows your filter to be applied to the subtotal level, rather than the detail level. <\/p>\n\n\n\n<p>For example, suppose you have a report built over the sales history file and you had selected the Customer Number as the dimension. Assume customer ABC had 5 rows, each showing sales for $5,000.  <\/p>\n\n\n\n<p>Using a filter type of WHERE (the default) and specifying a filter of sales greater than $8,000 would yield no results since none of the <strong>detail<\/strong> level rows are greater than $8,000.<\/p>\n\n\n\n<p>However, changing to a filter type of HAVING would show data as the total sales for customer ABC would be $25,000 which is more than than the $8,000 HAVING filter.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Filters can be used to display subsets of data in an application. For instance, imagine a retrieval built over a sales history table with over 100,000 records. It is not always practical to show all 100,000 records at one time. Perhaps an end-user needs to be able to select&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[248],"ht-kb-tag":[],"class_list":["post-5646","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-build-process"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/5646","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=5646"}],"version-history":[{"count":25,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/5646\/revisions"}],"predecessor-version":[{"id":14097,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/5646\/revisions\/14097"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=5646"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=5646"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=5646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}