Jump to content
Software FX Community

Problem with drilldown


dkmartini
 Share

Recommended Posts

Hi,

I started w/ this script

-----

$SQL = "SELECT DISTINCT sr_status as Status, COUNT(*) AS TicketsFROM v_CBI_Open_TicketsWHERE   (Company_Name <> 'ConnectWise')  GROUP BY sr_status"

invoke-sql -server cw -database cwwebapp_connections -sql $sql  | out-chart -template opentickets -caption "Open Tickets" -Title "Open Tickets" -sidebar tickets -group tickets -name "Open Tickets" -drilldown_script allTicketsDrillDown.ps1 -drilldown_parameter {$_.status}

------

changed it to this script to be able to specify the colors of each bar in the chart

-------

function getColor{   if ($args[0] -eq 'Enter Time') {   return 'Yellow'   }   if ($args[0] -eq 'Scheduled') {   return 'Green'   }   if ($args[0] -eq 'Completed') {   return 'Green'   }   if ($args[0] -eq 'Done Yet?') {   return 'Red'   }

  return 'Blue'}

$SQL = "SELECT DISTINCT sr_status as Status, COUNT(*) AS TicketsFROM v_CBI_Open_TicketsWHERE   (Company_Name <> 'ConnectWise')  GROUP BY sr_status"

$items = invoke-sql -server cw -database cwwebapp_connections -sql $sql$clr0 = getColor $items[0].Status$clr1 = getColor $items[1].Status$clr2 = getColor $items[2].Status$clr3 = getColor $items[3].Status$clr4 = getColor $items[4].Status$clr5 = getColor $items[5].Status$clr6 = getColor $items[6].Status$clr7 = getColor $items[7].Status$clr8 = getColor $items[8].Status$clr9 = getColor $items[9].Status$clr10 = getColor $items[10].Status$clr11 = getColor $items[11].Status$clr12 = getColor $items[12].Status

$items | out-chart -allseries_multiplecolors true -points_0_color $clr0 -points_1_color $clr1 -points_2_color $clr2 -points_3_color $clr3 -points_4_color $clr4 -points_5_color $clr5 -points_6_color $clr6 -points_7_color $clr7 -points_8_color $clr8 -points_9_color $clr9 -points_10_color $clr10 -points_11_color $clr11 -points_12_color $clr12 -template opentickets -caption "Open Tickets" -Title "Open Tickets" -sidebar tickets -group tickets -name "Open Tickets" -drilldown_script allTicketsDrillDown.ps1 - drilldown_parameter {$_.status}

---------------

Now my drilldown doesn't work. What am I missing?

Thanks

dkm

Link to comment
Share on other sites

It looks like this is a feed into open tickets in connectwise. Have you gotten this working.... Would you be interested in sharing/selling you work?

Do you have screen shots?

 I am new to gadget development and looking to the ability to pull live data from CW to both with gadgets and Sharepoint.

 Lyf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...