Skip to main content

onConstantNew

Last updated 23/07/2026

Constant creation handler

This example demonstrates how the

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

onResponse
callback.

TypeScript
Constant creation handler
onConstantNew: (constant: DIQ_Constant, onResponse: (result: DIQ_Result) => void) => {

// Save the constant to the application's database
database.saveConstant(constant);

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

};