Tech Blog

Passing Parameters to the AEK from App Builder

The aim of this blog is to give a guide on how to pass useful values from the App Builder into an AEK integration. This topic assumes you’re already familiar with:

  • How to create and publish AEK menu options
  • How to create and deploy AEK projects

If you’re not, please review these pages:

The corresponding GitHub project to this blog can be found here.

Implementation Steps

1.Create an AEK project that you would like to pass a parameter into.
2.Edit the runserver.yaml file to simulate passing in parameters from an “action link.” Make sure the devPath is correct or else you will get errors that your screen cannot be found.

The runserver.yaml file should look something like this:

      - desc: Action Link Parameters
        screenName: action-link-parameters
        devPath: "/aek/c/action-link-parameters?test_param=firebrick"

Later on when the AEK project has been deployed to the app environment, these parameters will come from the App Builder configuration.

3.In your AEK project, you can obtain the parameter being passed. There are two ways to do this, one is from the client side and one is from the server-side:

  1. The client-side uses a JavaScript method to return the value of the parameter
  2. The server-side has to be setup in the ECT file like a regular web service call

The example project showcases both ways of obtaining these parameters. Please find the “exlib-action-link-parameters” project here for more details. The example project shows the difference in speed between these two methods. The project code also details the specifics of how they work.

4.Deploy your own custom project to your app environment or deploy the example given. Once the project has been deployed to your app environment, you will need to set up the AEK menu option. This is required for the Action URL later on.
5.After setting up your AEK menu option, note down the AEK menu option ID, either from the form itself or from the address bar. You will need the “AEK” prefix that comes before the ID. This ID will be used in the next step.

Here is an example:

6.Now that the AEK menu option has been set up, go to your new tile within the App Builder and assign it an Action URL.

The URL should look something like this:

campusm://loadaek?toolbar=[ menu option ID ]&[ parameter name ]=[ parameter value ]

Here is an example:

7.The example project allows you to pass in a variable called “test_param” and this changes the color that displays on the page. This example is passing in the color “firebrick.” When testing locally, “firebrick” is passed in from the runserver.yaml file.

Here is what the example project should look like once it’s up and running:

4 Replies to “Passing Parameters to the AEK from App Builder”

  1. Hello Henry,

    I didn’t find anything in the documentation (small note, I wrote that down as a new blog idea, so hopefully something will be posted soon). Here is one example of how you can use runserver.yaml to set up your live tile locally with different properties:

    – desc: Test
    tileComponent: TestTile
    tileWidth: 3
    tileHeight: 2
    backgroundColor: darkgreen
    textColor: “#ffffff”

    You can get the keywords for these properties from App Builder by clicking on a tile and clicking the small button that says “code” under the “Tile Config” section. This will list the properties that are currently set for the tile and you will be able to see the keywords that are used. You can use these similarly in your runserver.yaml file.

    If that wasn’t clear, feel free to reach out to me.

Leave a Reply