Our consortium would like a flex header icon to display if a CID has an open CSI. I see the example Urgent CSI sql in the flex header recipe book, but I'm having a hard time using this as a framework to only show an icon if there is an open CSI. I can partially get it to work for open CSIs that are in a non-autoclose category, but it will still show the icon for CSIs that are autoclosed. I can't seem to get it to ignore the autoclosed CSIs. Is there a straightforward column in some table that shows the closed/open flag that I'm missing?
This was working for us, in TR_FLEX_HEADER_ELEMENT, last time I checked (from our initial v16 work):
select case when x.res_ind = 'N' then 'OPEN SUB CSI' else '' end from ( select top 1 isnull(b.res_ind,'Y') as res_ind from VS_CUST_ACTIVITY a WITH (NOLOCK) left join t_issue_action b WITH (NOLOCK) on a.activity_no = b.activity_no where a.customer_no = @customer_no and a.category not in (18,19,20,21) and b.action = 18 order by b.action_dt desc ) x
Thanks for the quick response! I ended up doing the below and it seems to be working (any more experienced folks feel free to give feedback).