1
General Board / Re: Default Tags by element type
« on: May 02, 2025, 09:09:16 pm »
Thanks! I'll take a look at this.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
SELECT pkg.Name as Package,
diag.Name as Diagram,
org.Name as Organization,
ref.Name as Guidance,
refa.Default as Guidance_Date,
resp.Name as Responsibility,
resp.Alias as Responsibility_Type,
respreq.Requirement as Description,
IIF(resp.Alias = "Responsibility",
MID(auth.Constraint, INSTR(auth.Constraint, "- ")+2), \\Only if Alias is "Responsibility"
"None Specified") as Authority \\If Alias is "Reference Task"
FROM t_package pkg,
t_diagram diag,
t_object org,
t_diagramObjects dorg,
t_object ref,
t_diagramObjects dref,
t_connector cref,
t_attribute refa,
t_object resp,
t_objectrequires respreq,
t_diagramObjects dresp,
t_connector cresp,
t_objectConstraint auth
WHERE pkg.Package_ID = #PACKAGEID# AND \\ Package
pkg.Package_ID = diag.Package_ID AND \\ Diagram
(dorg.Diagram_ID = diag.Diagram_ID AND \\ Organization
org.Object_ID = dorg.Object_ID AND
org.Object_Type = "Actor") AND
(dref.Diagram_ID = diag.Diagram_ID AND
dref.Ojbect_ID = ref.Object_ID AND
ref.Object_Type = "Artifact" AND
ref.Alias = "Authoritative Document" AND
cref.Start_Object_ID = org.Object_ID AND
cref.End_Object_ID = ref.Object_ID AND
cref.Connector_Type = "Dependency") AND \\ Guidance Document
(refa.Object_ID = ref.Object_ID AND
ref.Name = "Document Date") AND \\ Guidance Document Date
(dresp.Diagram_ID = diag.Diagram_ID AND
dresp.Object_ID = resp.Object_ID AND
resp.Object_Type = "Artifact" AND
cresp.Start_Object_ID = ref.Object_ID AND
cresp.End_Object_ID = resp.Object_ID AND
cresp.Connector_Type = "Dependency") AND \\ Responsibility ; Identified as either "Responsibility" or "Reference_Task"
(respreq.Object_ID = resp.Object_ID) AND \\ Responsibility Description
((res.Alias = "Responsibility" AND
resp.Object_ID = auth.Object_ID AND \\ Find "Authority" if a "Responsibility"
auth.Constraint LIKE "Authority*") OR \\ Extract "Authority" from string, "Authority Reference - MyDocument"
(resp.Alias = "Reference Task") )
Ignoring the "Authority" column and logic, I correctly get the following Results:Package Diagram Organization Guidance Guidance Date Responsibility Responsibility Type Description
------- ------- ------------ -------- ------------- -------------- ------------------- -----------------
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Resp_1 Responsibility "Resp_1 Desc...."
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 2 Reference Task "Ref Tsk 2 Desc."
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 3 Reference Task "Ref Tsk 3 Desc."
Package Diagram Organization Guidance Guidance Date Responsibility Responsibility Type Description Authority
------- ------- ------------ -------- ------------- -------------- ------------------- ----------------- ----------------------
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Resp_1 Responsibility "Resp_1 Desc...." Authority Document 100
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 2 Reference Task "Ref Tsk 2 Desc." None Specified
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 3 Reference Task "Ref Tsk 3 Desc." None Specified
Package Diagram Organization Guidance Guidance Date Responsibility Responsibility Type Description Authority
------- ------- ------------ -------- ------------- -------------- ------------------- ----------------- ----------------------
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Resp_1 Responsibility "Resp_1 Desc...." Authority Document 100
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 2 Reference Task "Ref Tsk 2 Desc." None Specified
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 3 Reference Task "Ref Tsk 3 Desc." None Specified
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 2 Reference Task "Ref Tsk 2 Desc." None Specified
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 3 Reference Task "Ref Tsk 3 Desc." None Specified
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 2 Reference Task "Ref Tsk 2 Desc." None Specified
PKG_1 Diag_1 My_Org SOP_10 1/1/2000 Ref Tsk 3 Reference Task "Ref Tsk 3 Desc." None Specified
....Repeats for a couple hundred rows
t_diagram.objectstyle has an entry like
ImageID=1708599719;
along with other semiclon separated blurb. Here you have to add the right id from your image.
In the API you refer that as diagramObject.Style.
Good luck.
q.