Applications and Applets
Widgets
Create Widgets
3 min
to create widgets, from the layout section of the application builder or applet builder page, select widget and then drag and drop it into the form layout you can add multiple widgets per application or applet to edit the widget, select the widget in the layout then, in the properties sidebar, click edit widget widgets are rendered on the record page and have access to the record values through the record attribute every change to the record will automatically update the widget, by calling its update method you can trigger playbooks from widgets the application from which you are building the widget must contain a playbook button use the button property in context data to trigger a playbook upon clicking the playbook button this reuses the playbook inputs specified in the playbook use this code to set up a playbook button widget the record attribute is a javascript object, where the keys are the field's key property, and the value is the field value for that record example if an application has a text field with the key text and a numeric field with the key numeric , the record object would look like this this object can be used in the widget's update method to generate the updated html of the widget after a change widgets do not store any data; they are only used to build a ui that interacts with other data on the record if any data needs to be stored, do so in a field on the record (either visible or hidden) exporting an application or applet will also export the widget as part of it, so it can be easily imported to another instance of swimlane turbine this allows the widgets to be shared and reused very easily by embedding them into an applet and exporting it since the widget's code is also included in the exported application or applet json file, swimlane recommends that you do not include any sensitive information in widgets