Certain m-Power features require the use of an Option List. For instance, in a maintainer, you may want to have a dropdown from which an end-user can select a value. The values in the dropdown are populated using an Option List. Option Lists can also be used to populate the values of radio buttons. One additional feature of the Option List template is that values can be linked to a description, so that the description appears at runtime but the value is used by the database. Learn more about this feature.
Applications created with this template are not expected to be run in the browser, and instead work behind the scenes.
Program Name: This will be the application’s number. By default, m-Power uses the letter I (Inquiry) 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.
Template: You can select a template by scrolling left or right 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.
Here you can see/modify the primary table you have selected for your application. You can also create or modify table joins using this specification.
Here you can select the field that your application will sequence by; you can have multiple sequence fields. You can re-order the sequences to fit your application’s needs. In an Option List, the sequencing Controls the order your data is shown in the list.
Here you will find the settings for all the fields in the application. The options are:
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.
Display: A radio button allows developers to display or hide the field from the output page. There may be situations where a field is needed for calculation purposes, but the field does not need to be displayed at runtime.
Length: Here you can modify the length of the field. m-Power will only allow developers to shorten the length of the field, shortening a fields length will truncate its data. For example, if a field is 10 alpha and it is changed to 5 alpha, now only the first 5 characters will be displayed. The same principle applies to a numeric field, if a numeric field is 8 digits long; changing it to 4 digits long will only display the first 4 digits, and leave out the rest of digits.
Decimals: For numeric fields, you can modify the amount of decimal digits. A numeric field will have the option of changing its decimal length, alpha fields does not have a decimal option, developers can use this as an indicator to check if a field is a numeric or character type.
Numeric Format Code: For numeric fields, you can modify the way the numbers will display, this includes displaying decimals 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.
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.
User def: This feature has been deprecated.
Record Selections can be created over fields from both primary as well as secondary tables. 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.
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; 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. Learn more. However, calculations are used infrequently in Option List applications.
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: Learn more.
*STRADVSCH This location has been deprecated.
*ADVRECSEC This location has been deprecated. Learn more about Row Level security.
*READRECRD This location will call the external object after each record is processed.
*SELECTFLT This location has been deprecated.
SmartLinks are not supported in the Option List template.
Note: After performing any changes in the above sections, the application must be recompiled for the changes to load. If the changes are to be displayed at runtime, then the Presentation Layer code (HTML) must be overwritten when recompiling the application.
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.|
||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.|
||23||Applications allow you to pass values directly to any field when it is specified as a sequence key.|
||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 Option List Specific Parameters:
|Name||Valid Values||Example Value||Default Value||Description|
||CUSNO||m-Power uses this option to sort the data by at runtime.|
||Y||N||m-Power uses this option to inform the server to resort the data.|
||EQ||This allows you to set the relationship for FIELD's filtering, and is used in conjunction with val_FIELD. For instance, rls_CNAME=CT would set column CNAME's search relationship to Contains.|
||1||0||This parameter tells your retrieval that this page is a SmartLink. This means that the page will only show records that equal the value(s) you pass to it. Without specifying slnk=1, the page assumes a greater than or equal to (GE) relationship.|
||0||1||m-Power uses this option to know whether to sort by ascending or descending order.|
||23||Used in conjunction with rls_FIELD, this is used to filter apps through the URL. For instance, specifying val_CNAME=ABC means that your page will use ABC as the value to search for in column CNAME.|