Configuring Global Application Properties
As you may know, the majority of an application's behavior is controlled via the Application Properties file, found within each specific application. This design, while giving developers maximum control and flexibility, can sometimes frustrate developers who would like to globally control some of these properties across all of their m-Power applications. For instance:
- You would like all of your applications to default to display 20 rows, instead of the default (10 rows).
- You would like all of your filtering to be case insensitive, rather than the default (case sensitive).
- You would like to default the redirection page of a report sent via email to a specific page, rather than the default (mrc's website).
- You dislike the m-Power default graphing colors and would like to default to your corporate color palette
Developers who are interested in adding this type functionality can now do so at the Data Dictionary level. To illustrate, lets walk-through changing the case-sensitivity property to make all applications be case-insensitive by default.
Step 1 — Finding the attribute to set globally
To start, we first need to copy the code we will use to reset the default property. First, open m-Painter for any application. Navigate to File -> "Open File." Click the "Show All Files" button, then click the I00010p.xml (where I00010 is your application #) file located under "Other Files". Lastly, press OK.
This will open up an XML output. Search through the document for the setting you wish to use for your Global Property. In our case, it is the case sensitivity option.
Copy the entire xml element (including the start and the end tag). This will be used for Step 2.
Note: If you are having trouble finding the tag, please note that they are organized by what tab they are located under in the graphical interface. In the screen shot above, you can see this element was found under the "SQL Statement" tab.
Step 2 — Loading the attribute
Next, navigate to the Admin section. Next click "Edit Dictionary Files", then "Dictionary Configuration." Click "Text Mode". Search for the string "<Default_Properties".
Note: If this code does not exist in your file, you can add it via copying and pasting the following directly before the "</mpower-config>" tag.
<Default_Properties tabDescription="Default Properties">
Directly after the "<Default_Properties…" tag, paste the code from Step 1. Be sure to click "Save".
Step 3 — Configuring the attribute
Back in the "Edit Dictionary Files" screen, click "Dictionary Configuration" once more. Navigate to the "Default Properties" tab.
Here you will see the new element that you added in Step 2. Now that you've loaded it, you can customize the value through the on-screen editor. Notice that I've already changed my caseSensitive property to be case-insensitive. Be sure the Press Accept.
By setting the above, all
Frequently Asked Questions
Question: Why do I have to load the property myself?
Answer: m-Power supports hundreds of application properties — as such, it would not be practical to pre-load every one of these for you, as most users would get lost trying to search for their specific property.
Question: How can I control which templates these global properties will be applied to?
Answer: The global application properties will be applied to all applications, no matter the template selected.
Question: I've set up a fair amount of work for my global properties in Dictionary A, but now I've made Dictionary B and now they are not there. How can I easily copy these over?
Answer: The underlying changes were made to the file mpower-config-DICTIONARY.xml in /m-power/proddata/conf (where DICTIONARY is your Data Dictionary's name). Simply copy the entire "<Default_Properties>" section and paste it into your new Dictionary's configuration file.