SQL View Name:topic_list
SQL View Number:5861
Group:CIM
Base Table:topic
Description:view for list of top in the interaction overview page. Used in interaction_view_html_inc.jsp JSP page
Flags:VIEW_OPTIMIZED 
Baseline/Custom:Baseline

Fields:

Field NameCommon TypeDatabase TypeGeneric Field IDArray SizeDefaultFlagsComment
intrxn_objidLONGint   DIRECT Internal record number for interaction 
reason_1CHARvarchar 40  Categorization of the reason for the interaction. From user-defined popup list with default name Interaction Reason_1 
reason_2CHARvarchar 40  Categorization of the reason for the interaction. From user-defined popup list with default name Interaction Reason_2 
resultCHARvarchar 40  Standard result code. From user-defined popup list with default name Interaction Result Code 
sub_typeLONGtinyint   DIRECT sub-type of the object (i.e, 1=quote, 4=order) 
topic_objidLONGint3  DIRECT Internal record number for topic 
work_idCHARvarchar4255  ID number of the object 
work_objidLONGint   DIRECT Internal record number of various objects 
work_titleCHARvarchar 255  Title of the object 
work_typeLONGint   DIRECT type of the object (i.e 0=case, 45=contact, etc.) 

SQL:

(
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
c.title as work_title,
c.id_number as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_case c
where
t.focus_lowid=c.objid and
t.focus_type=0
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
s.title as work_title,
s.id_number as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_subcase s
where
t.focus_lowid=s.objid and
t.focus_type=24
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
l.title as work_title,
l.lit_req_id as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_lit_req l
where
t.focus_lowid=l.objid and
t.focus_type=5309
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
c.title as work_title,
c.id as work_id,
t.focus_type as work_type,
c.struct_type as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_contract c
where
c.struct_type=1 and
t.focus_lowid=c.objid and
t.focus_type=86
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
c.title as work_title,
c.id as work_id,
t.focus_type as work_type,
c.struct_type as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_contract c
where
c.struct_type=4 and
t.focus_lowid=c.objid and
t.focus_type=86
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
ta.title as work_title,
ta.task_id as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_task ta
where
t.focus_lowid=ta.objid and
t.focus_type=5080
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
o.name as work_title,
o.id as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_opportunity o
where
t.focus_lowid=o.objid and
t.focus_type=5000
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
d.title as work_title,
d.id_number as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_dialogue d
where
t.focus_lowid=d.objid and
t.focus_type=5200
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
'Show History' as work_title,
null as work_id,
t.focus_type as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t,
table_proc_inst_log p
where
t.focus_lowid=p.objid and
t.focus_type=9778
union
select
t.objid as topic_objid,
t.topic2intrxn as intrxn_objid,
t.focus_lowid as work_objid,
null as work_title,
null as work_id,
-1 as work_type,
-1 as sub_type,
t.reason_1 as reason_1,
t.reason_2 as reason_2,
t.result as result
from
table_topic t
where
t.focus_lowid is null
)
My Recent Objects
topic_list