Looper Unit Test
  • 22 Sep 2023
  • 1 Minute to read
  • Contributors

Looper Unit Test


Article Summary

Looper Unit Test

This application explains how to setup and use the Looper custom widget

Purpose

The purpose of the Looper Unit Test is to allow users to learn and understand how to setup and use the Looper custom widget in their Tulip applications. Custom widgets are coded widgets that sit on top of the Tulip platform to give additional functionality that is not currently part of the main platform. The Looper Custom Widget can be used to loop through an array of table records and bulk update these records.

Setup

Custom Widget Plugins interact with your application through the use of properties and events. Properties are the shared data that exists between your application and widget, while events are signals that your widget can send to your application. In your app editor you can build triggers based off these events. Events can be made to send data to your application as well.

The Looper Custom Widget makes use of one properties and three events. The property being used is called 'Loop List' and is of type text list and is read-only. This is the list that you pass into the widget to be looped upon.

The first event being used in this custom widget is called 'Loop Action' and this event fires for each item in the list and outputs the list item.. The second event being used in this custom widget is called 'End Action' and this event fires when all items in the loop list have been looped through successfully. The third event being used in this custom widget is called 'Error' and this fires if there are more than 250 items passed into the loop list.

How it Works

The Looper Custom Widget can be used to loop through an array of table records and bulk update these records. An example of how the Looper custom widget works can be seen in the GIF below.

Lopperv2.gif


Was this article helpful?