Skip to main content

onListVariables

Last updated 23/07/2026

List variables handler

This example demonstrates how the

callback retrieves variables belonging to a specific variable folder from the host application. Once the variables have been retrieved, the result and variable list are returned to the widget through the

onResponse
callback.

TypeScript
List variables handler
onListVariables: (folder: DIQ_VariableFolder, onResponse: (result: DIQ_Result, variables: Array<DIQ_Variable> | null) => void) => {

// Retrieve variables belonging to the selected folder
const variables = database.getVariablesByFolder(folder.key);

// Return the variables to the widget
onResponse({
success: true
}, variables);

};