The Utils JavaScript Library
JavaScript methods for interacting with apps.
Use the utils
JavaScript API methods to perform actions and control behavior.
These methods are not available within transformers or workflows.
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
utils.changeLocale
Change the user's locale.
Definition
utils.changeLocale(locale)
Parameters
Examples
"en"
Examples
Change the locale to en
.
utils.changeLocale('en');
utils.confetti
Display a confetti animation.
Definition
utils.confetti()
Examples
Display a confetti animation.
utils.confetti();
utils.copyToClipboard
Copy the specified data to the clipboard.
Definition
utils.copyToClipboard(data)
Examples
Copy the value of textInput1.value
to the clipboard.
utils.copyToClipboard(textInput1.value);
utils.downloadFile
Download the specified data as a file. data
can be a string for plain text data or an object containing base64-encoded binary data.
Definition
utils.downloadFile(data, fileName, fileType)