dbo.QBM_FTDialogProcessSelect

SQL_TABLE_VALUED_FUNCTION

Created 2026-04-14T23:20:32.163 · modified 2026-04-14T23:20:32.163 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@ObjectKeyvarcharno
@XUserInsertednvarcharno
@ChildrenListvarcharno
@IncludeSubstitutionbitno

Referenced objects

SchemaObjectColumn/minorClass
dboDialogProcessOBJECT_OR_COLUMN
dboDialogProcessGenProcIDOBJECT_OR_COLUMN
dboDialogProcessBasisObjectTypeOBJECT_OR_COLUMN
dboDialogProcessObjectKeyOBJECT_OR_COLUMN
dboDialogProcessProcessStateOBJECT_OR_COLUMN
dboDialogProcessXDateInsertedOBJECT_OR_COLUMN
dboDialogProcessXDateUpdatedOBJECT_OR_COLUMN
dboDialogProcessXUserInsertedOBJECT_OR_COLUMN
dboDialogProcessXUserUpdatedOBJECT_OR_COLUMN
dboDialogProcessCustomCommentOBJECT_OR_COLUMN
dboDialogProcessDisplayNameOBJECT_OR_COLUMN
dboDialogProcessChainOBJECT_OR_COLUMN
dboDialogProcessChainGenProcIDOBJECT_OR_COLUMN
dboDialogProcessChainObjectKeyOBJECT_OR_COLUMN
dboDialogProcessChainXUserInsertedOBJECT_OR_COLUMN
dboDialogProcessSubstituteOBJECT_OR_COLUMN
dboDialogProcessSubstituteGenProcIDNewOBJECT_OR_COLUMN
dboDialogProcessSubstituteGenProcIDOriginOBJECT_OR_COLUMN
dboDialogProcessSubstituteReadyForDeleteOrExportOBJECT_OR_COLUMN
dboQBM_YCursorBufferTYPE
dboQBM_YParameterListTYPE

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1create function dbo.QBM_FTDialogProcessSelect(@ObjectKey varchar(138)  , @XUserInserted nvarchar(64)  , @ChildrenList varchar(max)  , @IncludeSubstitution
2 bit ) returns @erg table ( BasisObjectType nvarchar(32) collate database_default , CustomComment nvarchar(256) collate database_default , GenProcID varchar
3(38) collate database_default , ObjectKey varchar(138) collate database_default , DisplayName nvarchar(1024) collate database_default , ProcessState nchar
4(1) collate database_default , XUserInserted nvarchar(64) collate database_default , XUserUpdated nvarchar(64) collate database_default , XDateInserted
5 datetime , XDateUpdated datetime , Origin int ) with schemabinding as begin  declare @Work dbo.QBM_YCursorBuffer  declare @Children dbo.QBM_YParameterList
6 if @ChildrenList > ' ' begin insert into @Children(Parameter1) select y.Value from string_split(@ChildrenList, char(7)) as y where y.value > ' '  if @@ROWCOUNT
7 > 0  begin insert into @Work(UID1 , Int1 ) select p.GenProcID , 17 as Origin from dbo.DialogProcess p with (readpast) join @Children l on p.ObjectKey 
8= l.Parameter1 union all select p.GenProcID , 18 as Origin from dbo.DialogProcessChain p with (readpast) join @Children l on p.ObjectKey = l.Parameter1
9 end end if @ObjectKey > ' ' begin insert into @Work(UID1 , Int1 ) select p.GenProcID , 1 as Origin from dbo.DialogProcess p with (readpast) where p.ObjectKey
10 = @ObjectKey union all select p.GenProcID , 2 as Origin from dbo.DialogProcessChain p with (readpast) where p.ObjectKey = @ObjectKey end if @XUserInserted
11 > ' ' begin insert into @Work(UID1 , Int1 ) select p.GenProcID , 1 as Origin from dbo.DialogProcess p with (readpast) where p.XUserInserted = @XUserInserted
12 union all select p.GenProcID , 2 as Origin from dbo.DialogProcessChain p with (readpast) where p.XUserInserted = @XUserInserted end if @ObjectKey > ' '
13 and @IncludeSubstitution = 1 begin  insert into @Work(UID1 , Int1 ) select s.GenProcIDNew as GenProcID , 4 as Origin from dbo.DialogProcessSubstitute 
14s with (readpast) where exists (select top 1 1 from dbo.DialogProcess p with (readpast) where p.ObjectKey = @ObjectKey  and p.GenProcID = s.GenProcIDOrigin
15 )  and s.ReadyForDeleteOrExport = 0 union all  select s.GenProcIDOrigin as GenProcID , 8 as Origin from dbo.DialogProcessSubstitute s with (readpast) 
16where exists (select top 1 1 from dbo.DialogProcess p with (readpast) where p.ObjectKey = @ObjectKey  and p.genprocId = s.GenProcIDNew )  and s.ReadyForDeleteOrExport
17 = 0 end if @XUserInserted > ' ' and @IncludeSubstitution = 1 begin  insert into @Work(UID1 , Int1 ) select s.GenProcIDNew as GenProcID , 4 as Origin from
18 dbo.DialogProcessSubstitute s with (readpast) where exists (select top 1 1 from dbo.DialogProcess p with (readpast) where p.XUserInserted = @XUserInserted
19  and p.GenProcID = s.GenProcIDOrigin )  and s.ReadyForDeleteOrExport = 0 union all  select s.GenProcIDOrigin as GenProcID , 8 as Origin from dbo.DialogProcessSubstitute
20 s with (readpast) where exists (select top 1 1 from dbo.DialogProcess p with (readpast) where p.XUserInserted = @XUserInserted  and p.genprocId = s.GenProcIDNew
21 )  and s.ReadyForDeleteOrExport = 0 end insert into @erg(BasisObjectType, CustomComment, GenProcID, ObjectKey, DisplayName , ProcessState, XUserInserted
22, XDateInserted, XDateUpdated, Origin , XUserUpdated ) select d.BasisObjectType, d.CustomComment, d.GenProcID, d.ObjectKey, d.DisplayName ,d.ProcessState
23, d.XUserInserted, d.XDateInserted, d.XDateUpdated, x.Origin , d.XUserUpdated from dbo.DialogProcess d with (readpast) join ( select w.UID1  , MAX(w.Int1
24  & 1) + MAX(w.Int1  & 2) +MAX(w.Int1  & 4) + MAX(w.Int1  & 8) + MAX(w.Int1  & 16) as Origin from @Work w group by w.UID1  ) as x on d.GenProcID = x.UID1
25  where exists  ( select top 1 1 from dbo.DialogProcessChain pc with (readpast) where pc.GenProcID = d.GenProcID )   return end 
26

Module relation graph

Loading module relation graph…

Source-derived context

Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.

provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:32.163

None extracted.

Summary: writes INSERT into; reads/joins string_split, DialogProcess, DialogProcessChain, DialogProcessSubstitute

Declared parameters

ParameterTypeDirection
@ObjectKeyvarchar(138)input
@XUserInsertednvarchar(64)input
@ChildrenListvarcharinput
@IncludeSubstitutionbitinput

DML targets

INSERT into

Called routines

None extracted.

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @ObjectKey @XUserInserted @ChildrenList @IncludeSubstitution @erg @Work @Children @ROWCOUNT

Referenced by / reverse dependencies

Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.

No reverse dependencies extracted.