Skip to content

AmiScript 4: Functions and Custom Methods

This fourth tutorial in the series will look at how to reduce the amount of code we need to write when creating dashboards in AMI. We will start by comparing methods to functions and demonstrating how to use AMI Script Functions and where to find the associated documentation. We will then use AMI Script Functions to solve a few problems to demonstrate how they help us write better code. The formal concept of a function will be introduced and we will cover return types, names, parameters and arguments. This knowledge will be used to create our own Custom Method, our own reusable piece of code. We will then explore the idea of having multiple parameters and method overloading and how they help improve code reuse. Finally, we will demonstrate how powerful Custom Methods can be by using them to format data in a Table Visualization.

  • Topics Covered


    Functions:

    • AMI Script Functions
    • What are functions
    • Multiple parameters
    • Method overloading

    Custom Methods:

    • Creating Custom Methods
    • Demonstrate where they can be used.
  • Resources


    This tutorial requires you to download the following dashboard: