{"id":6540,"date":"2013-09-24T09:45:50","date_gmt":"2013-09-24T14:45:50","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=6540"},"modified":"2017-06-12T12:10:21","modified_gmt":"2017-06-12T17:10:21","slug":"grid-add-maint-template","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/maint\/grid-add-maint-template","title":{"rendered":"Grid Add Maintenance Template"},"content":{"rendered":"<p><!-- Begin Content --><\/p>\n<h1><a class=\"anchor\" id=\"index\">Grid Add Maintenance Template<\/a><\/h1>\n<p>&nbsp;<\/p>\n<p>Jump to:<\/p>\n<p><a href=\"#single_chart\">Features<\/a><br \/>\n<a href=\"#notes\"><strong>Jump to Template Specific Notes<\/strong><\/a><br \/>\n<a href=\"#runtime\">Runtime Walkthrough<\/a><br \/>\n<a href=\"#in-action\">Template In-Action<\/a><br \/>\n<a href=\"#properties\">Application Properties<\/a><br \/>\n<a href=\"#parameters\">Web Parameters<\/a><\/p>\n<p>As it sounds, this template allows adding multiple records on a grid at the same time. This template makes it a simple to create powerful, user-friendly interfaces for adding data.<\/p>\n<h2><a class=\"anchor\" id=\"single_chart\">Features that Apply to the Grid Add Maintenance Template<\/a><\/h2>\n<p><iframe src='\/docs\/wp-content\/plugins\/hubspoke\/hubspokeHTML.php?script=grid-add-maintainers' height='400' width='700'><\/iframe><\/p>\n<h2><strong>Grid Add Maintenance Features:<\/strong><\/h2>\n<div class=\"leftMargin\">\n<a class=\"anchor\" id=\"A\"><strong>Add Multiple Database Records:<\/strong><\/a><br \/>\nThe Grid Add Maintenance template can be used to create web applications that allow end users to rapidly add multiple records to the database through a single screen.<br \/>\n<a href=\"#single_chart\">Back to Diagram<\/a><\/p>\n<p><a class=\"anchor\" id=\"B\"><strong>URL Redirection:<\/strong><\/a><br \/>\nm-Power developers have the ability to specify a URL to redirect to after adding a new record.  For instance, maintainers are often linked to from retrievals and reports in order to add a single database row.  After adding the row, a URL redirect can be used to return to the original data list.  The URL redirection can be conveniently specified within the application properties. <a href=\"\/legacy\/maint\/maintenance-redirection\">More Information<\/a><br \/>\n<a href=\"#single_chart\">Back to Diagram<\/a><\/p>\n<p><a class=\"anchor\" id=\"D\"><strong>Modify Primary Tables Only:<\/strong><\/a><br \/>\nm-Power developers can specify whether each maintenance application can be used to edit only primary tables or to edit primary and secondary tables.  By default, maintenance applications will only allow modification of the primary table whenever a table join is made.  This setting can be altered via application properties, and prevents unwanted modification of secondary tables.<br \/>\n<a href=\"#single_chart\">Back to Diagram<\/a><\/p>\n<p><a class=\"anchor\" id=\"E\"><strong>Easily Upload Files:<\/strong><\/a><br \/>\nm-Power developers can specify a field to store file names, and at runtime, one or more files can be uploaded at once easily.  Using m-Power&#39;s <a href=\"\/legacy\/maint\/upload-files-to-server-via-web-2-0-maintenance-applications\">upload feature<\/a>, dynamic file paths, and files with the same name can all be easily handled.<br \/>\n<a href=\"#single_chart\">Back to Diagram<\/a><\/p>\n<p><a class=\"anchor\" id=\"F\"><strong>Use Alternative Input Methods:<\/strong><\/a><br \/>\nm-Power maintenance templates can utilize radio buttons, check boxes, calendar pickers, and external drop-down lists to populate input values.  These can easily be created via field settings within the m-Power interface and m-Painter to improve application functionality and appearance.<br \/>\n<a href=\"#single_chart\">Back to Diagram<\/a><\/p>\n<p><a href=\"#index\">Back to the Top<\/a>\n<\/div>\n<h2><strong><a class=\"anchor\" id=\"notes\">Template Notes<\/a><\/strong><\/h2>\n<h3><strong><a class=\"anchor\" id=\"applicationSettings\">Application Settings<\/a><\/strong><\/h3>\n<div class=\"leftMargin\">\n<strong>Description<\/strong>: Allow developers to specify their application&#39;s description.<\/p>\n<p><strong>Program Name<\/strong>: This will be the application\u2019s name, by default m-Power uses the letter M (Maintenance) followed by a five digit number.<\/p>\n<p><strong>Template<\/strong>: You can select a template by scrolling through the available templates. The templates define the general layout and functionality of the resulting application. This section will list all the available maintenance templates; you will see a small screenshot of what that template looks like at runtime. Learn <a href=\"\/legacy\/m-power-build-process\/select-a-template\" target=\"_blank\">more<\/a> about templates.\n<\/div>\n<h3><strong><a class=\"anchor\" id=\"dataSelection\">Data Selection<\/a><\/strong><\/h3>\n<p>Here you will see\/modify the table you have selected for your application. Here you can create or modify joins to other tables as well. When tables are selected, only the primary table can be modified, by default. This is done to protect developers from accidental cascading changes. This behavior can be modified within the application properties.<\/p>\n<h3><strong><a class=\"anchor\" id=\"sequencing\">Sequencing<\/a><\/strong><\/h3>\n<p>When building maintenance applications, a developer\u2019s sequencing selection is analogous with selecting a Primary Key. This selection will tell m-Power how this table is unique. If the sequencing key(s) are not unique, then multiple records will be affected when a record is modified or deleted.  Any fields that are set as sequencing fields within a maintenance application will not be editable.<\/p>\n<h3><strong><a class=\"anchor\" id=\"fieldSettings\">Field Settings<\/a><\/strong><\/h3>\n<div class=\"leftMargin\">\nHere you will find the settings for all the fields in the application. The options are:<\/p>\n<p><strong>Delete<\/strong>: You can delete fields by clicking the checkbox and clicking Accept. If a field has a red circle with a cross line, that means that the field is being used somewhere else in the application (sequence, calculation, etc.), and, due to this dependency, is not available for deletion.  <strong>Note:<\/strong> deleting a field will remove the field from the application only, the table will be unchanged.<\/p>\n<p><strong>Field Name<\/strong>: This is the same name the field has in the table.<\/p>\n<p><strong>Table<\/strong>: The name of the table where that field exists.<\/p>\n<p><strong>Field Description<\/strong>: This is the text that will appear in the column header for that field, you can modify this field to suit your needs. This field will populate with the field description from the table by default, but it can be customized at the application level.<\/p>\n<p><strong>Type<\/strong>: A drop down list that allows developers to designate whether a field is to be displayed (visible, but not edited on the database), hidden (no action), or updated. There may be situations where a field is needed for calculation purposes, but the field does not need to be displayed at runtime.  Note: sequence keys must be set to update to ensure your application functions properly.<\/p>\n<p><strong>Size<\/strong>: This displays the length of a field.  If a field has a length consisting of two numbers separated by a comma, the first number will be the integer length and the second the decimal length of the field.<\/p>\n<p><strong>Numeric Format Code<\/strong>: For numeric fields, you can modify the way the numbers will display, this includes displaying commas or not, how to display negative numbers, etc. Multiple formats are built in for developers to use, shall you need a different format code, m-Power allows developers to create their own User Defined Format codes; these codes will add logic for common types of fields such as: Currency, Time, or Dates. Accessing the User Defined Format Codes from the Admin section will also allow developers to modify current codes. Learn <a href=\"\/legacy\/general\/edit-codes-in-servlets\" target=\"_blank\">more<\/a>.<\/p>\n<p><strong>Lowercase<\/strong>: This option determines whether or not an alpha field can be submitted to the database with lowercase letters. If this is set to &quot;no,&quot; the field will be converted to uppercase when it is submitted.<\/p>\n<p><strong>User def<\/strong>: If you would like a user to be able to upload a file over a field, select the letter &#39;U&#39; from the dropdown.  The remaining options have been deprecated.  For information on uploading files to a server, click <a href=\"\/legacy\/maint\/upload-files-to-server-via-web-2-0-maintenance-applications\">here<\/a>.<\/p>\n<p><strong>Note:<\/strong> Do not confuse the User Defined Format Code with the <em>User Defined Functions<\/em> (UDF). The latter is a feature that allows developers to create or incorporate programing functions into m-Power. Learn <a href=\"\/legacy\/external-objects-udf\/introduction-to-user-defined-functions\" target=\"_blank\">more <\/a>about UDFs.<\/p>\n<p><strong>Validity Check Relation<\/strong>: This setting, combined with the Validity Check Value setting will allow you to restrict what information may be entered into your maintenance application. Valid relationships are:<\/p>\n<p>EQ Equal to<br \/>\nGE Greater than or equal to<br \/>\nGT Greater than<br \/>\nLE Less than or equal to<br \/>\nLS Is in the list<br \/>\nNS Not in the list<br \/>\nLT Less than<br \/>\nNE Not equal to<br \/>\nNG Not greater than<br \/>\nNL Not less than<br \/>\nRG Is in the range<br \/>\nRB Radio Button<br \/>\nCB Checkbox<\/p>\n<p><strong>Validity Check Value<\/strong>: This is the value that you want to compare the field value entered to in order to restrict the user from proceeding. A common use of this and the previous setting is to prevent the user from leaving a character field blank. This is done by setting the Validity Check Relation to &quot;NE&quot; and setting the Validity Check Value to be &quot;*BLANK&quot;. This will prevent the user from entering a blank value into the field.<\/p>\n<p><strong>Default Value for Add<\/strong>: Text entered here will be entered into the field initially when a new record is being added. Users may change it to whatever they wish, however this is what they see first. A common use of this setting is to add &quot;Insert Full Name Here&quot; into a name field.<\/div>\n<h3><strong><a class=\"anchor\" id=\"recordSelections\">Record Selections<\/a><\/strong><\/h3>\n<p>Grid Add Maintainers do not display data, so record selections are not supported.<\/p>\n<h3><strong><a class=\"anchor\" id=\"calculations\">Calculations<\/a><\/strong><\/h3>\n<p>Calculations are a very powerful feature of m-Power; with calculations, developers can create logical fields that will apply to the current application only. This can be used to include SQL code in a field, such as cast a numeric field as character, create date conversions, inserting the current date and time, and much more.<\/p>\n<p><strong>Note:<\/strong> like all other application types, the result of a calculation is always read only.  In other words, calculations are not written to the database in maintenance applications. <a href=\"\/legacy\/calcs\/m-power-calculation-screen\" target=\"_blank\">Learn more<\/a><\/p>\n<h3><strong><a class=\"anchor\" id=\"externalObjects\">External Objects<\/a><\/strong><\/h3>\n<p>This feature allows developers to connect m-Power application with their current business logic, or to extend m-Power capabilities by allowing developers to write their own Java, RPG, or SQL programs, and integrating these programs into the applications. m-Power utilizes &quot;locations&quot; to connect the external objects, these locations vary depending on what the external object does and when it should be executed. The following locations are supported in this template: <\/p>\n<div class=\"leftMargin\">\n<strong>*AFTERADD<\/strong> This location calls the object only after a user adds a row.<br \/>\n<strong>*AFTERPRC<\/strong> This location calls the object after the last row is processed.<br \/>\n<strong>*BEFOREADD<\/strong> This location calls the object only before a user adds a row.<br \/>\n<strong>*BEFOREPRC<\/strong> This location calls the object after the first row is processed.<br \/>\n<strong>*INITADD<\/strong> This location calls the object when the page loads.<br \/>\n<strong>*REDIRECT<\/strong> This location is deprecated in this template.<br \/>\n<strong>*FLDVALID<\/strong> This location calls the object to validate fields before add.<br \/>\n<a href=\"\/legacy\/m-power-build-process\/external-objects\" target=\"_blank\">Learn more<\/a>\n<\/div>\n<h3><strong><a class=\"anchor\" id=\"smartLinks\">SmartLinks<\/a><\/strong><\/h3>\n<p>SmartLinks are not supported in Grid Add Maintenance applications.<\/p>\n<p><a href=\"#index\">Back to the Top<\/a><\/p>\n<h2><strong><a class=\"anchor\" id=\"runtime\">Runtime Walkthrough<\/a><\/strong><\/h2>\n<p><iframe loading=\"lazy\" width=\"640\" height=\"360\"  src=\"\/\/www.youtube.com\/embed\/ewq3bJFO_qo\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p class=\"scriptbutton\"><input class=\"toggleScript\" id=\"script1\" type=\"button\" value=\"Show Video Script\" \/><\/p>\n<p class=\"script script1\">\nGrid Add Maintainers allow end-users to rapidly add records to the database.  By default, this application will open with ten records.  If we need to add fewer than ten records, we can do so by clicking the red &#39;x&#39; to remove the row.  Alternatively, we can click &#39;Add Row&#39; if we want to add more than ten records.  If we click on the &#39;Reset&#39; button, this will clear all data that has been entered within the grid.<\/br><br \/>\nIn our example, we are going to add Boston and Minneapolis to our database.  Note that the sequential field has already been populated, as the field has been set to auto-sequence.  Once we have added all the data, and removed the extra rows, we can click &#39;Accept&#39; to save this record to the database.\n<\/p>\n<p><a href=\"#index\">Back to the Top<\/a><\/p>\n<h2><strong><a class=\"anchor\" id=\"in-action\">Template In-Action<\/a><\/strong><\/h2>\n<p><strong>Note:<\/strong> The grid add maintenance template is only available in the PC presentation layer.<\/p>\n<div id=\"tabs\">\n<ul>\n<li><a href=\"#tabs-1\">PC Output<\/a><\/li>\n<\/ul>\n<div name=\"tabs-1\"><a href=\"\/legacy\/images\/grid_add_pc.png\"><img decoding=\"async\" src=\"\/legacy\/images\/grid_add_pc.png\" class=\"alignnone\" \/><\/a><\/div>\n<\/div>\n<p><a href=\"#index\">Back to the Top<\/a><\/p>\n<h2><strong><a class=\"anchor\" id=\"properties\">Application Properties<\/a><\/strong><\/h2>\n<p>When accessing the Application Properties, a window will slide open with multiple tabs; let\u2019s go through each of the tabs:<\/p>\n<p><?php\n  $template = urlencode('Grid Add Maintenance');\n  echo file_get_contents('https:\/\/www.mrc-productivity.com\/mrcjava\/servlet\/MPPACKAGE.R00006s?run=1&#038;D_DETAIL=1&#038;data=1&#038;R001='.$template);\n?><\/p>\n<p><a href=\"#index\">Back to the Top<\/a><\/p>\n<h2 id=\"parameters\"><strong>Web Parameters<\/strong><\/h2>\n<p><?php\n  $template = urlencode('Grid Add Maintenance');\n  echo file_get_contents('https:\/\/www.mrc-productivity.com\/mrcjava\/servlet\/MPPACKAGE.R00001s?run=1&#038;D_DETAIL=1&#038;data=1&#038;R001='.$template);\n?><\/p>\n<p><a href=\"#index\">Back to the Top<\/a><\/p>\n<p><!-- End Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Grid Add Maintenance Template &nbsp; Jump to: Features Jump to Template Specific Notes Runtime Walkthrough Template In-Action Application Properties Web Parameters As it sounds, this template allows adding multiple records on a grid at the same time. This template makes it a simple to create powerful, user-friendly interfaces for adding data. Features that Apply to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3567,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6540","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/6540","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=6540"}],"version-history":[{"count":30,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/6540\/revisions"}],"predecessor-version":[{"id":6549,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/6540\/revisions\/6549"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/3567"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=6540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}