→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Champion Sweeper
Is there a way to run a report to get a string of a subject line, then drill down further into the body of the ticket to a specific string, run a loop to "read" a string and output that string with a count next to it?

I get a blanket user lockout email from my point of sale system and would like to know if it is possible to get a count of how many times my point of sale employees get locked out. I can run a report on the subject line, but that isn't useful to me as I need specifics.

User locked out

In the body:
Alert User: (user id here)

My abilities with SQL aren't that great and thinking about it further all I can really think of is run a report in lansweeper and then run a script on the (user id) section to make a counting array of some sort.
Lansweeper Employee
Lansweeper Employee
Keeping it very simple, this report below should work once you have entered the correct subject and user ID.

Select Top 1000000 Count(htblticket.ticketid) As [# of tickets]
From htblticket
Inner Join htblnotes On htblticket.ticketid = htblnotes.ticketid
Where Cast(htblnotes.note As nvarchar(1000)) Like '%123%' And
htblticket.subject Like '%user locked out%'

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now