Skip to main content

onVariableNew

Last updated 23/07/2026

Variable creation handler

This example demonstrates how the

callback persists a newly created variable within the host application. Once the variable has been successfully stored, the result is returned to the widget through the

onResponse
callback.

TypeScript
Variable creation handler
onVariableNew: (variable: DIQ_Variable, onResponse: (result: DIQ_Result) => void) => {

// Save the variable to the application's database
database.saveVariable(variable);

// Notify the widget that the operation completed successfully
onResponse({
success: true
});

};