Skip to main content

DIQ_Result

Last updated 18/02/2026

Purpose

The

DIQ_Result
type represents the outcome of an operation performed with DimensionIQ. This type is commonly returned from host callbacks or internal operations and it provides a consistent, predictable way for both the DimensionIQWidget and the host application to communicate whether an operation succeeded or failed, along with optional contextual information.

This type is commonly returned from:

  • Host callbacks (eg, save, update, delete operations)
  • Validation routines
  • Internal service operations
  • Persistence or API calls

By standardizing operation results into a single type, DimensionIQ ensures reliable error handling and predictable integration behavior.

Why This Type Exists

DimensionIQ is event-driven and frequently relies on the host applictaion to:

  • Persist data
  • Validate data
  • Authorize actions
  • Perform business-specific logic

Because these operations occur outside the core widget, the widget must receive a structured response that clearly communicates:

  • Whether the operation succeeded
  • If not, why it failed
  • Whether user feedback should be shown

DIQ_Result
provides this structured contract.

Properties

PropertiesTypeRequiredDescription
ok
boolean
YesIndicates whether the operation was successful,
true
, or failed,
false
message
string
NoOptional contextual message - used for error details, validation feedback, or informational notes

Behavioral Expectations

When

ok
is
true
:

  • The operation is considered successful
  • The widget will proceed with normal flow
  • The
    message
    may be ignored or optionally logged

When

ok
is
false
:

  • The operation is considered failed
  • The widget may:
    • Prevent UI state updates
    • Revert changes
    • Display the provided
      message
      to the user
    • Log error for diagnostics
  • The
    message
    may be ignored or optionally logged

Integration Guidelines

When implementing callbacks that return

DIQ_Result
:

  • Always return a structured object
  • Never return
    null
    or
    undefined
  • Do not throw exceptions for expected validation failures, return
    ok: false
    instead
  • Provide meaningful
    message
    values when
    ok
    is
    false

Summary

DIQ_Result
is the foundational response contract within DimensionIQ. It ensures that all host-driven operations are predictable, safe, communicate clearly, and integrate consistently.