<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://greggsmith.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Klingmak</id>
		<title>SDU - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://greggsmith.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Klingmak"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Special:Contributions/Klingmak"/>
		<updated>2026-04-17T20:36:32Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Stored_Queries&amp;diff=4349</id>
		<title>Stored Queries</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Stored_Queries&amp;diff=4349"/>
				<updated>2011-09-23T17:14:33Z</updated>
		
		<summary type="html">&lt;p&gt;Klingmak: Affected End User's Primary Contact as listed on End User's Location record&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Configuration]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Stored Queries are used exclusively for the [[Scoreboard]]. Stored Queries have no capabilities or functionality outside of the Scoreboard.&lt;br /&gt;
&lt;br /&gt;
When defining Stored Query you must prefix all single quotation marks (') with backslash (\) character.&lt;br /&gt;
&lt;br /&gt;
To simply check Stored Query you can fill it into the Additional Search Argument field in the Search window. But you must fulfill these rules:&lt;br /&gt;
* Select proper base type (Contact, Request, Change...)&lt;br /&gt;
* Remove backslash (\) characters&lt;br /&gt;
* Change all variables (ie. @cnt.id) with correct values (@cnt is object with logged in user)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Requests, Incidents, Problems, Change Orders &amp;amp; Issues ===&lt;br /&gt;
{| style=&amp;quot;width:100%;vertical-align:top;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:30%;&amp;quot; | Description&lt;br /&gt;
! style=&amp;quot;width:40%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width:30%;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Active&lt;br /&gt;
| active = 1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Inactive&lt;br /&gt;
| active = 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Has Assignee&lt;br /&gt;
| assignee is not null&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| No Assignee&lt;br /&gt;
| assignee is null&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Assignee is the person logged in&lt;br /&gt;
| assignee = @cnt.id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User is the person logged in&lt;br /&gt;
| customer = @cnt.id&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Location&lt;br /&gt;
| customer.location = U\'A26C98F436C43149A700CC0ED3BA74E5\'&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Location contains specific text&lt;br /&gt;
| customer.location.name like \'%keyword%\'&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Site&lt;br /&gt;
| customer.location.site = 400001&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Location is the same as the person logged in&lt;br /&gt;
| customer.location = @cnt.location&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Site is the same as the person logged in&lt;br /&gt;
| customer.location.site = @cnt.location.site&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User is the person logged in&lt;br /&gt;
| customer = @cnt.id&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Primary Contact&lt;br /&gt;
| customer.location.primary_contact&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Person logged in is the Primary Contact for the Affected End User's Location&lt;br /&gt;
| customer.location.primary_contact = @cnt.id&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Attached CO&lt;br /&gt;
| (change IS NOT NULL AND change != 0)&lt;br /&gt;
| Requests, Incidents &amp;amp; Problems only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User is the person logged in&lt;br /&gt;
| affected_contact = @cnt.id&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Location&lt;br /&gt;
| affected_contact.location = U\'A26C98F436C43149A700CC0ED3BA74E5\'&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Site&lt;br /&gt;
| affected_contact.location.site = 400001&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Location is the same as the person logged in&lt;br /&gt;
| affected_contact.location = @cnt.location&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Location contains specific text&lt;br /&gt;
| affected_contact.location.name like \'%keyword%\'&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Affected End User's Site is the same as the person logged in&lt;br /&gt;
| affected_contact.location.site = @cnt.location.site&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Requester is the person logged in&lt;br /&gt;
| requestor = @cnt.id&lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Logged in person's CAB(s) group tickets &lt;br /&gt;
| cab.[group]group_list.member IN (@cnt.id) &lt;br /&gt;
| Applies to Change Orders and Issues only&lt;br /&gt;
|-&lt;br /&gt;
| Callback Today&lt;br /&gt;
| call_back_flag=1 AND call_back_date &amp;lt; EndAtTime(\'TODO_TODAY\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Category or Request/Incident/Problem Area is specific&lt;br /&gt;
| category.id = nnnnnn&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Group is specific&lt;br /&gt;
| group=U\'7D15BCD6D0B7E8468E58EA600E61F484\'&lt;br /&gt;
| For pre-r11 releases, just reference the id.&lt;br /&gt;
|-&lt;br /&gt;
| Member of the Group is the person logged in&lt;br /&gt;
| group.group_list.member IN (@cnt.id)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created by the person logged on&lt;br /&gt;
| log_agent = @cnt.id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Priority is 1&lt;br /&gt;
| priority = 5&lt;br /&gt;
| References the enum value not the sym value.&lt;br /&gt;
|-&lt;br /&gt;
| Priority is 5&lt;br /&gt;
| priority = 1&lt;br /&gt;
| References the enum value not the sym value.&lt;br /&gt;
|-&lt;br /&gt;
| Resolved&lt;br /&gt;
| active = 1 and status = \'RE\'&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SLA has been violated&lt;br /&gt;
| sla_violation = 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SLA has not been violated&lt;br /&gt;
| sla_violation != 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created in the past 60 minutes&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'PAST_HOUR\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created in the past 24 hours&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'PAST_DAY\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created in the past 7 days&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'PAST_WEEK\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created in the past 30 days&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'PAST_MONTH\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created in the past 365 days&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'PAST_YEAR\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created last hour&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'LAST_HOUR\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created last month&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'LAST_MONTH\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created last year&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'LAST_YEAR\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created this hour&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'THIS_HOUR\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created this month last year&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'THIS_MONTH_LAST_YEAR\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created today&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'TODAY\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created today after noon&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'AFTER_NOON\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created today before noon&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'BEFORE_NOON\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created yesterday&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'YESTERDAY\') AND open_date &amp;lt; EndAtTime(\'YESTERDAY\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Created yesterday and today&lt;br /&gt;
| open_date &amp;gt; StartAtTime(\'YESTERDAY\')&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Workflow &amp;amp; Issue Workflow ===&lt;br /&gt;
{| style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:30%;&amp;quot; | Description&lt;br /&gt;
! style=&amp;quot;width:40%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width:30%;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Assignee is logged in person&lt;br /&gt;
| assignee = @cnt.id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Assignee is a specific Group&lt;br /&gt;
| assignee=U\'7D15BCD6D0B7E8468E58EA600E61F484\'&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Logged in person is a member of the Group set as the Assignee&lt;br /&gt;
| assignee.[group]group_list.member IN (@cnt.id)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Group is specific&lt;br /&gt;
| group=U\'7D15BCD6D0B7E8468E58EA600E61F484\'&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Future&lt;br /&gt;
| status.allow_task_update = 0 AND status = \'WAIT\'&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Waiting&lt;br /&gt;
| status = \'WAIT\'&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Pending&lt;br /&gt;
| status = \'PEND\'&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| To do today&lt;br /&gt;
| status = \'PEND\' AND est_completion_date &amp;lt; EndAtTime(\'TODO_TODAY\')&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Cannot be edited&lt;br /&gt;
| status.allow_task_update = 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Is not complete&lt;br /&gt;
| status.task_complete = 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Is not next in the Workflow&lt;br /&gt;
| status.do_next_task = 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Specific Task Type&lt;br /&gt;
| task.sym = \'[task name]\'&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Contacts ===&lt;br /&gt;
{| style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:30%;&amp;quot; | Description&lt;br /&gt;
! style=&amp;quot;width:40%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width:30%;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| All Analysts&lt;br /&gt;
| type = 2307&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Analyst is available&lt;br /&gt;
| available = 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Analyst is unavailable&lt;br /&gt;
| available=0 OR available IS NULL&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Contact is active&lt;br /&gt;
| delete_flag = 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Contact is inactive&lt;br /&gt;
| delete_flag = 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Contact's Location is the same as the logged in person's Location&lt;br /&gt;
| location = @cnt.location&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Members of concrete group&lt;br /&gt;
| id.[member]group_list.group IN (U\'0969194BE95B974F9535687570A8E5B1\')&lt;br /&gt;
| U\'0969194BE95B974F9535687570A8E5B1\' is an contact_uuid attribute of the group&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Configuration Items ===&lt;br /&gt;
&lt;br /&gt;
=== Knowledge ===&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Scoreboard]]&lt;br /&gt;
&lt;br /&gt;
[[Time-based Stored Queries]]&lt;/div&gt;</summary>
		<author><name>Klingmak</name></author>	</entry>

	</feed>