SmartLinks allow you to easily link one application (Retrieval, Report, or Maintenance) to any other application, passing key data automatically. The benefits of this are many, including:

  • You can create applications that allow users to drill from an order header table to order detail records.
  • View a list of products and maintain records based on the value you selected.
  • Useful when making Dashboard Applications.

To create a SmartLink application, you will need (at least) two applications: The calling application and the receiving application. While it may seem backwards, you should always create the receiving application first, then create the calling application last.

  1. When your SmartLink calls the receiving application, it will examine what dimension fields of the receiving application. Only fields that are dimension keys in the receiving application will be passed.
  2. Be sure to include Dimension keys that exist in both applications. If they have different names, be sure to set up a Synonym.
  3. If no matching fields can be found, no values will be passed along with your Smartlink.
  4. Compile your application, and make note of the application type and application number as we will use this information in our next step.

Next, let’s build the calling application.

  1. Create or select an application that has one or more fields that match the dimension keys of the receiving application. The fields in the calling application do not need to be dimension keys, they simply need to exist.
  2. Click the SmartLinks button within Application Options and click “Create Smartlink”. Click either Retrievals, Reports, or Maintainers (this depends on the type of application you built in Step 1).
  3. Use the navigation options to find the application you made in Step 1. Click the green “arrow” icon.
  4. Recompile your application and overwrite the HTML.

At runtime, your calling application will contain a link in the right-most column of your table (bottom-most if it is a Single Row Data list template). Clicking on it will pass all of the values of the dimension keys of the receiving application where they existed in the calling application.

You can use m-Painter to remove the generated link and replace it with a link on any value. Please consider this option by using the “Insert/Edit Link” button.

Smartlinking in m-Painter

Selecting your Smartlink application from the ‘Smartlinks’ drop down will automatically build out the Smartlink URL for you. As a note, this slnk=1 parameter tells my 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.

Real World Application

You wish to see Sales History Data in a Multiple Row Data List Retrieval. The problem is that the file contains millions of records and you know that you only ever want to see data for one particular customer at a time. You decide that you want to first show users a screen with all current customers. From here, the user should click on a customer, then they will be taken to all the Sales History data for that customer only.

  1. Build your Sales History Retrieval. You must use the Customer Number field as the dimension. The reason you must do this is because m-Power will only pass data from key fields to an application. Build the retrieval.
  2. Next, build your Customer look-up retrieval over your Customer Master table. Here the dimension key does not matter because this is the calling application. Simply be sure that the customer number has been included in this application.
  3. Add a SmartLink from the customer look-up to the Sales History application. m-Power will automatically know to pass the Customer # because that field is the key field in the receiving application. Compile the look-up.
Updated on September 27, 2021

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support