Summary applications write directly to the database, in the form of a new table. This means that summaries are generally run in batch, behind the scenes. This also means an end-user never accesses a summary to retrieve data. Instead, they would run a report or a retrieval that is written over the summary table. Summaries are unique in that they must be subtotaled by one and only one field. This subtotal will represent the data in the table, as no detail information will be included in the new summary table since this application summarizes data.
Program Name: This will be the application’s number. By default, m-Power uses the letter S (Summary) followed by a five digit number.
Select Only Matching Records: Select either 'No', for a left outer join, or 'Yes' for an inner join. A left outer join will return all records from the primary table along with matching records from the secondary tables. An inner join will return records from the primary and secondary tables only where matching records are found.
Summary Table Name: This will be the name given to the table created by the application.
Summary Table Schema/Library: Specify the schema/library in which your application will be created. This will default to your current data dictionary.
Summary Table Description: Specify a description for your table.
Replace or Add Records: Selecting 'Replace' will clear the table and then add data, whereas selecting 'add' will append the data to the existing table.
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.
Select the first, or only, table you want your summary to be written over, and then select your fields. After adding your fields, you are brought to the Summary Field Definition screen. Seeing as you are building a summary application, m-Power assumes you would like to Summarize or Average numeric fields. If you would like to do so, select either the "Summary" or "Average" option from the "Sum/Avg" dropdown list. If you do not select either of these options, m-Power will place the last value from the detail level into each subtotal line.
Note: Selecting Average or Summary will create a new field within your Data Dictionary. Because of this, you must specify a new name. Additionally, consider adding a length of two to new fields' lengths to compensate for possible data truncation. If you would like to add a new description, you can do so under the "Text" column.
After finishing, click 'Accept'. You can now join to additional tables, and will be brought back to the Summary Field Definition screen after each subsequent join.
When building a summary application, multiple sequence keys are allowed. However, only one subtotaled field is allowed, and this subtotal will represent the data in the table as no detail information will be included in the new summary table.
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.
New Name: This is the new name you gave to your field in the Summary Field Definition screen.
New Description: This is the new description you gave to your field in the Summary Field Definition screen.
Write Field?: Specify whether the field should be written to the database.
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.
User def: This option has been deprecated.
Record Selections can be created over any database fields. These are the options:
Relation: A drop down allows you to select a relationship for the filter.
Value: This is the value to compare against. The options are:
Constant Value: A constant value allows you to hard-code any given value into a selection. This value cannot be modified by the end-user at run–time.
Application Field Value: Developers have the option of comparing a value from one field to a value from another field within the same record.
Runtime Value Prompt: This option allows end-users to decide the value of their record selection at runtime.
And/Or: When creating multiple record selections, you have the option to set them as "and" or "or" Example: selection A "and" selection B will display only records that match both selections. Selection A "or" selection B will display records that match one or both selections. Learn more.
Calculations are a very powerful feature of m-Power. In summaries, calculations can be written to the database to create a new field. Learn more. As such, developers have the ability to name the field created by the calculation.
Note: If the chosen Calculation Name already exists (either as a field or another summary calculation) with different attributes, an error message will be displayed showing the existing definition. You must either change the Calculation Name to a unique name, or change the attributes to match the existing definition.
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:
*STRSEARCH: This location has been deprecated for this template.
SmartLinks are not supported in Summary templates since Summaries do not output to the screen, but rather write back to the database in the form of a new table. For testing and debugging purposes, there is a runtime shell that can be run in the browser, but generally end users will never run a Summary since they are most often scheduled to be run at desired intervals using the Scheduled Tasks and Messaging plugin.
Note that unlike other applications, recompiling a summary causes the summary table to be dropped and recreated.
When accessing the Application Properties, a window will slide open with several tabs; let’s go through each of the tabs:
Common Parameters — These parameters apply to every template:
|Name||Valid Values||Example Value||Default Value||Description|
||1||0||This parameter allows the app to only display the main content area.|
||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.|
||33||Freemarker custom parameters can be passed through the URL.|
||1||0||This parameter allows the app to only display the main data table.|
||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.|
||23||Applications allow you to pass values directly to any field when it is specified as a dimension.|
||1||0||This parameter controls whether the parameter listing screen should be displayed for this application or not.|
||1||0||This parameter controls whether the header and footer are hidden.|
||1||0||This parameter allows the app to only display the HTML inside the associated custom import.|
||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.|
||es||en||This lets you choose which language layer to view for the entire session. Only available when using the m-Power Translate feature.|
Web 2.0 Summary Specific Parameters:
|Name||Valid Values||Example Value||Default Value||Description|
||2||0||This parameter allows your summary to run automatically, bypassing its prompt page.|
||23||Replacing XXX with your prompted filter # (i.e. your first runtime value prompt filter would be R001). If Range or List relation, separate values with a space.|