Custom Sources
The following diagram shows the layers a custom source query from Excel traverses before it returns a result. If you’re not getting the result you expect, use this to troubleshoot where it may be going wrong.
Custom Source query flow diagram
Hover over nodes to see additional info.
graph TD
classDef decision fill:#E7E2FB,stroke:#963BB8,stroke-width:2px, color:#000000
classDef process fill:#A1DBEB,stroke:#21A4BF,stroke-width:2px, color:#000000
classDef highlight fill:#fef9c3,stroke:#ca8a04,stroke-width:3px, color:#000000
subgraph AddInLayer ["Excel Add-in (Client Side)"]
Start["User Query Entered"] --> AddInCache("Add-in has request in cache?")
AddInCache -- "No" --> ServerRequest["Sends query to server"]
AddInCache -- "Yes" --> LocalReturn["Returns result from local cache"]
PopCache["Population Cache"] --> SignalExcel["Signal Excel Finished"]
SignalExcel --> OnCalc["Trigger OnCalculate"]
OnCalc --> FinalCells["Populate Cells"]
end
subgraph ServerLayer ["Quintessence Server"]
subgraph InputValidation ["Parameter Validation"]
DataModel --> ResolveEnt["Resolve Entities"]
ResolveEnt --> OtherParams["Other parameters"]
end
ServerRequest --> DataModel["Check Data Model"]
OtherParams --> RequiredValueDefinitions["Define requested entity value definitions"]
RequiredValueDefinitions --> ContextRes["Context Resolution"]
ContextRes -- "Simple" --> DatabaseQuery["Query database"]
ContextRes -- "Custom" --> CodeTypePref["Input Mapping"]
DatabaseQuery --> MergeResults
CodeTypePref --> CheckMemCache("Has memory cache?")
CheckMemCache -- "Off" --> RunScript["Parse & Run Script"]
CheckMemCache -- "On" --> MergeResults["Merge results from all simple and custom sources"]
RunScript --> OutMap["Output Mapping"]
OutMap --> UpdateMemCache("Uses memory cache?")
UpdateMemCache -- "On" --> UpdateCache["Update Cache"]
UpdateMemCache -- "Off" --> MergeResults
UpdateCache --> MergeResults
MergeResults --> ConstructResult["Construct request result"]
ConstructResult --> ReturnExcel["Return Result to Excel"]
end
ReturnExcel --> PopCache
class Start,ServerRequest,PopCache,SignalExcel,OnCalc,FinalCells process
class AddInCache,CheckMemCache,SourceType,UpdateMemCache,ContextRes decision
class LocalReturn,ServerRequest,ParamVal,DataModel,DataModel,SourceVal,ResolveEnt,CodeTypePref,RunScript,OutMap,DataFilters,UpdateCache,ReturnExcel process
class RequiredValueDefinitions,OtherParams,DatabaseQuery,MergeResults process
style AddInLayer fill:#f1f5f9,stroke:#64748b,stroke-width:2px
style ServerLayer fill:#f1f5f9,stroke:#64748b,stroke-width:2px
style InputValidation fill:#e0f2fe,stroke:#0284c7,stroke-width:1.5px,stroke-dasharray:4 3, color:#000000