Grid Add Maintenance Template

 

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 the Grid Add Maintenance Template

Grid Add Maintenance Features:

Add Multiple Database Records:
The 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.
Back to Diagram

URL Redirection:
m-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. More Information
Back to Diagram

Modify Primary Tables Only:
m-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.
Back to Diagram

Easily Upload Files:
m-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's upload feature, dynamic file paths, and files with the same name can all be easily handled.
Back to Diagram

Use Alternative Input Methods:
m-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.
Back to Diagram

Back to the Top

Template Notes

Application Settings

Description: Allow developers to specify their application's description.

Program Name: This will be the application’s name, by default m-Power uses the letter M (Maintenance) followed by a five digit number.

Template: 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 more about templates.

Data Selection

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.

Sequencing

When building maintenance applications, a developer’s 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.

Field Settings

Here you will find the settings for all the fields in the application. The options are:

Delete: 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. Note: deleting a field will remove the field from the application only, the table will be unchanged.

Field Name: This is the same name the field has in the table.

Table: The name of the table where that field exists.

Field Description: 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.

Type: 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.

Size: 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.

Numeric Format Code: 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 more.

Lowercase: This option determines whether or not an alpha field can be submitted to the database with lowercase letters. If this is set to "no," the field will be converted to uppercase when it is submitted.

User def: If you would like a user to be able to upload a file over a field, select the letter 'U' from the dropdown. The remaining options have been deprecated. For information on uploading files to a server, click here.

Note: Do not confuse the User Defined Format Code with the User Defined Functions (UDF). The latter is a feature that allows developers to create or incorporate programing functions into m-Power. Learn more about UDFs.

Validity Check Relation: 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:

EQ Equal to
GE Greater than or equal to
GT Greater than
LE Less than or equal to
LS Is in the list
NS Not in the list
LT Less than
NE Not equal to
NG Not greater than
NL Not less than
RG Is in the range
RB Radio Button
CB Checkbox

Validity Check Value: 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 "NE" and setting the Validity Check Value to be "*BLANK". This will prevent the user from entering a blank value into the field.

Default Value for Add: 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 "Insert Full Name Here" into a name field.

Record Selections

Grid Add Maintainers do not display data, so record selections are not supported.

Calculations

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.

Note: 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. Learn more

External Objects

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 "locations" 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:

*AFTERADD This location calls the object only after a user adds a row.
*AFTERPRC This location calls the object after the last row is processed.
*BEFOREADD This location calls the object only before a user adds a row.
*BEFOREPRC This location calls the object after the first row is processed.
*INITADD This location calls the object when the page loads.
*REDIRECT This location is deprecated in this template.
*FLDVALID This location calls the object to validate fields before add.
Learn more

SmartLinks

SmartLinks are not supported in Grid Add Maintenance applications.

Back to the Top

Runtime Walkthrough

Grid 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 'x' to remove the row. Alternatively, we can click 'Add Row' if we want to add more than ten records. If we click on the 'Reset' button, this will clear all data that has been entered within the grid.

In 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 'Accept' to save this record to the database.

Back to the Top

Template In-Action

Note: The grid add maintenance template is only available in the PC presentation layer.

Back to the Top

Application Properties

When accessing the Application Properties, a window will slide open with multiple tabs; let’s go through each of the tabs:

Back to the Top

Web Parameters

Common Parameters — These parameters apply to every template:

Name Valid Values Example Value Default Value Description
basic
  • 0: Off
  • 1: On
1 0 This parameter allows the app to only display the main content area.
CALCULAXXX
  • Any URL-encoded value
5000 When a calculation is a parameter calc, you can pass its value across the URL to other mrc applications. Use CALCULA001 for your first calculation, CALCULA002 for your second calculation, and so on, for all your parameter calculations.
Custom Parameters
  • Any URL-encoded value
33 Freemarker custom parameters can be passed through the URL.
data
  • 0: Off
  • 1: On
1 0 This parameter allows the app to only display the main data table.
debug
  • 0: Off
  • 1: On
  • 2: On & Show Import URLs
1 0 Loads your application with SQL statement and application logic time listed. This is often useful in determining how your dataset was determined and deciding if indexes should be created for this query.
devicetype
  • pc: Computer
  • tab: Tablet
  • mob: Smartphone
tab pc This parameter sets the current device type mode for the entire session. While device is automatically seen and set, you can use this to manually change it to a different device type.
FIELD
  • Any URL-encoded value
23 Applications allow you to pass values directly to any field when it is specified as a sequence key.
help
  • 0: Off
  • 1: On
1 0 This parameter controls whether the parameter listing screen should be displayed for this application or not.
hide_header_footer
  • 0: Show header/footer
  • 1: Hide header/footer
1 0 This parameter controls whether the header and footer are hidden.
impTags
  • Any positive integer
1 0 This parameter allows the app to only display the HTML inside the associated custom import.
init
  • 0: Off
  • 1: On
1 0 Forces your application to refresh the page from the server. Useful if you are making changes in a development environment but are not seeing your changes.
locale
  • ar: Arabic
  • bg: Bulgarian
  • ca: Catalan
  • zh: Chinese
  • cs: Czech
  • da: Danish
  • nl: Dutch
  • en: English
  • et: Estonian
  • fi: Finnish
  • fr: French
  • de: German
  • el: Greek
  • he: Haitian Creole
  • hi: Hindi
  • ht: Hebrew
  • hu: Hungarian
  • id: Indonesian
  • it: Italian
  • ja: Japanese
  • ko: Korean
  • lv: Latvian
  • lt: Lithuanian
  • no: Norwegian
  • pl: Polish
  • pt: Portuguese
  • ro: Romanian
  • ru: Russian
  • sk: Slovak
  • sl: Slovene
  • es: Spanish
  • sv: Swedish
  • th: Thai
  • tr: Turkish
  • uk: Ukrainian
  • vi: Vietnamese
es en This lets you choose which language layer to view for the entire session. Only available when using the m-Power Translate feature.

 

Grid Add Maintenance Specific Parameters:

Name Valid Values Example Value Default Value Description
add_redir
  • Any valid URL
MRCWORKLIB.I00010s This parameter controls where to redirect after adding a row. Use ${FIELD} to reference value from FIELD.
all_redir
  • Any valid URL
MRCWORKLIB.I00010s This parameter controls where to redirect after adding, updating or deleting a row. Use ${FIELD} to reference value from FIELD.
max_rows
  • Any positive integer
15 10 This parameter controls how many rows will be displayed when the page is displayed.
pageName
  • Any valid file in your data dictionary
I00010sAlt.html The default presentation file This parameter allows you to have multiple screens per application. Often useful when you need to paint outputs differently, yet still use the same application.

Back to the Top

Created: September 24, 2013 | Modified: June 12, 2017