Skip to main content

onListConstants

Last updated 23/07/2026

Constant listing handler

This example demonstrates how the

callback retrieves all constants contained within a constant folder from the host application's persistent storage. Once the constants have been retrieved, they are returned to the widget through the

onResponse
callback.

TypeScript
Constant listing handler
onListConstants: (folder: DIQ_ConstantFolder, onResponse: (result: DIQ_Result, constants: Array<DIQ_Constant> | null) => void) => {

// Retrieve all constants for the folder
const constants = database.getConstants(folder.key);

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

},