<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.dovetailsoftware.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sam Tyson</title><link>http://blogs.dovetailsoftware.com/blogs/styson/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Getting Things Done - with Dovetail ArchiveManager (DIET)</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/10/24/getting-things-done-with-dovetail-archivemanager-diet.aspx</link><pubDate>Fri, 24 Oct 2008 20:07:13 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11547</guid><dc:creator>styson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11547.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11547</wfw:commentRss><description>&lt;p&gt;I am currently working on a project where I need to take a database from empty to usable with a script file. I am at the point where I need to import data files, and the data files I need to import don't exist. The customer has the data, and luckily they have a tool to create nice, tidy data files for me - Dovetail Software's Data Import Export Tool (DIET). &lt;/p&gt;  &lt;p&gt;The challenge for me is to make it easy for them to use DIET, so I can get the data files that I need.&lt;/p&gt;  &lt;p&gt;DIET is the perfect tool for the job, because it is designed to do exactly what I need. I need data from three related tables in the database for this file, so I created a directives file to specifically control what information to extract.&lt;/p&gt;  &lt;p&gt;User-Defined Lists are one of the most challenging data structures within the database, but the directives file was pretty easy to build (with a little help from &lt;a href="http://blogs.dovetailsoftware.com/blogs/gsherman/" target="_blank"&gt;Gary Sherman&lt;/a&gt;). Here is the end result, which I will explain below:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier" size="1"&gt;EXPORT OBJECT hgbst_lst        &lt;br /&gt;&amp;#160; UNIQUE_FIELD = &amp;quot;title&amp;quot;         &lt;br /&gt;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TO hgbst_show THROUGH hgbst_lst2hgbst_show         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_elm THROUGH hgbst_show2hgbst_elm         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_show THROUGH prnt_chld2hgbst_show         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_elm THROUGH hgbst_show2hgbst_elm         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_show THROUGH prnt_chld2hgbst_show         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_elm THROUGH hgbst_show2hgbst_elm         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_show THROUGH prnt_chld2hgbst_show         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_elm THROUGH hgbst_show2hgbst_elm         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_show THROUGH prnt_chld2hgbst_show         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO hgbst_elm THROUGH hgbst_show2hgbst_elm         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ACTIONS = EXPORT, DELETE         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END_TO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_TO;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;At the top level,&amp;#160; I want to export data from the hgbst_lst table, and then also export any related data from the hgbst_show and hgbst_elm tables at the lower levels. Since I want to be able to extract this data from one database and import it into a different database, I avoided using any unique record identifiers (objid's). Using &amp;quot;title&amp;quot; as the unique identifier for the hgbst_lst table prevents multiple copies from being imported into the database.&lt;/p&gt;  &lt;p&gt;Each lower level is reached by the &amp;quot;TO &amp;lt;table&amp;gt; THROUGH &amp;lt;relation&amp;gt;&amp;quot; phrases, and that traverses through the parent-child relations that make up the user-defined list structure.&lt;/p&gt;  &lt;p&gt;The batch file that I set up and used for this data extraction is the other key piece of the puzzle. Here it is, and again the explanation follows:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;diet -user_name &amp;lt;USERNAME&amp;gt; -password &amp;lt;PASSWORD&amp;gt; -db_name &amp;lt;DATABASE&amp;gt; -license &amp;lt;LICENSE&amp;gt; &lt;/font&gt;&lt;font face="Courier" size="1"&gt;-directive hgbst.dir -archive -export hgbst.dat -where &amp;quot;title IN ('WORKGROUP', 'Recipient')&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This batch file is built for an Oracle database. The command line options that were key were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;-directive hgbst.dir - contains the directives file described above &lt;/li&gt;    &lt;li&gt;-archive - copies the data from the database but does not remove it &lt;/li&gt;    &lt;li&gt;-export hgbst.dat - specifies the file where the output data is written &lt;/li&gt;    &lt;li&gt;-where &amp;quot;title IN ('Msg Reason', 'Recipient', 'Reimbursement_addr')&amp;quot; - controls which lists are exported &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The other command line options control the database connection. Each one has to have a valid value, but otherwise they are self-explanatory.&lt;/p&gt;  &lt;p&gt;Here is a sample of the data that gets created:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" size="1"&gt;OBJECT TYPE=&amp;quot;hgbst_lst&amp;quot;, NAME=&amp;quot;hgbst_lst_268435457&amp;quot;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; UNIQUE_FIELD=title         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FIELDS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; title = &amp;quot;WORKGROUP&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; description = &amp;quot;Employee's work group designation&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; deletable = 1;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_FIELDS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; RELATIONS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_show_268435457&amp;quot; REL=&amp;quot;hgbst_lst2hgbst_show&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_RELATIONS         &lt;br /&gt;END_OBJECT NAME=&amp;quot;hgbst_lst_268435457&amp;quot; &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" size="1"&gt;OBJECT TYPE=&amp;quot;hgbst_show&amp;quot;, NAME=&amp;quot;hgbst_show_268435457&amp;quot;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FIELDS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; last_mod_time = DATE &amp;quot;?/?/? ?:?:?&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; title = &amp;quot;Level 1&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_FIELDS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; RELATIONS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_elm_268435462&amp;quot; REL=&amp;quot;hgbst_show2hgbst_elm&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_elm_268435461&amp;quot; REL=&amp;quot;hgbst_show2hgbst_elm&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_elm_268435460&amp;quot; REL=&amp;quot;hgbst_show2hgbst_elm&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_elm_268435459&amp;quot; REL=&amp;quot;hgbst_show2hgbst_elm&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_elm_268435458&amp;quot; REL=&amp;quot;hgbst_show2hgbst_elm&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_elm_268435457&amp;quot; REL=&amp;quot;hgbst_show2hgbst_elm&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_RELATIONS         &lt;br /&gt;END_OBJECT NAME=&amp;quot;hgbst_show_268435457&amp;quot; &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" size="1"&gt;OBJECT TYPE=&amp;quot;hgbst_elm&amp;quot;, NAME=&amp;quot;hgbst_elm_268435457&amp;quot;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FIELDS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; title = &amp;quot;Call Administrator&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; state = &amp;quot;Default&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_FIELDS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; RELATIONS         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TO_NAME=&amp;quot;hgbst_show_268435457&amp;quot; REL=&amp;quot;hgbst_elm2hgbst_show&amp;quot;;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; END_RELATIONS         &lt;br /&gt;END_OBJECT NAME=&amp;quot;hgbst_elm_268435457&amp;quot; &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Hopefully this will help get the data that you need out of your database - DIET can definitely do the job.&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11547" width="1" height="1"&gt;</description></item><item><title>Run-Time Query Parameter Evaluation</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/09/22/run-time-query-parameter-evaluation.aspx</link><pubDate>Mon, 22 Sep 2008 20:47:20 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11483</guid><dc:creator>styson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11483.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11483</wfw:commentRss><description>&lt;h3&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/RunTimeQueryParameterEvaluation_DDC8/image_6.png"&gt;&lt;img style="border-right:0px;border-top:0px;margin:0px 0px 5px 5px;border-left:0px;border-bottom:0px;" height="484" alt="image" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/RunTimeQueryParameterEvaluation_DDC8/image_thumb_2.png" width="479" align="right" border="0" /&gt;&lt;/a&gt; Overview&lt;/h3&gt;  &lt;p&gt;One of the new features coming soon in Dovetail Agent 4.1 is the enhanced capability of using parameters in fcQuery that will be evaluated when a query is executed. This allows queries to be designed with much more flexible structure. &lt;/p&gt;  &lt;p&gt;Dates are a very important parameter to be evaluated at run-time, and being able to build the query to do this automatically keeps the user from having to enter the date manually when running the query. Queries can be created to look at specific date-oriented information (i.e. &lt;font color="#0080ff"&gt;This Week&lt;/font&gt;) without having to change to values of the date parameters each time the query is run.&lt;/p&gt;  &lt;p&gt;Shared queries are also a very easy place to see where run-time evaluation of a query parameter will be helpful. For example, if a query is created (and shared to all users) to find all Cases for the current case owner, then any user that runs that query will find their cases without having to provide their login-name themselves. When the query is run, the current user's login name (i.e. &lt;font color="#0080ff"&gt;My Login Name&lt;/font&gt;) is matched against each case owner field.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Required Changes&lt;/h3&gt;  &lt;p&gt;There were a some changes that were necessary to implement this feature:&lt;/p&gt;  &lt;p&gt;The fcQuery Edit form was modified to allow the run-time parameters to be used. In this release of Dovetail Agent there are run-time parameters for date comparisons and current user comparisons.&lt;/p&gt;  &lt;p&gt;The SQL that is executed for a query is now evaluated every time it is run. Previously the SQL was built when the query was created or modified, and only regenerated at run-time if the query had changeable parameters. This also guarantees that if the base object was changed without updating the query itself, the resulting SQL that gets executed is current.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Defining the Parameters&lt;/h3&gt;  &lt;p&gt;The parameters that are set up to be used in the queries are currently defined within the source code of Dovetail Agent. The source code is contained in &lt;em&gt;fcQueryVariables.js&lt;/em&gt;, and it can be customized by updating that file. Each parameter is built and evaluated based on the following properties:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Name - the visible name of parameter that is used on the fcQuery Edit page (i.e. &lt;font color="#0080ff"&gt;My Login Name&lt;/font&gt;)      &lt;br /&gt;Value - how the parameter is referred to within the application itself (i.e. &lt;font color="#0080ff"&gt;MyLoginName&lt;/font&gt;)      &lt;br /&gt;Operation - how the parameter is used in an expression when it is evaluated (i.e. &amp;quot;is equal to&amp;quot;)      &lt;br /&gt;Expansion - indicates the run-time data source the parameter is evaluated against (i.e. FCSession('user.login_name'))      &lt;br /&gt;DataType - the data type of the table columns where the parameter will be available (i.e. &amp;quot;string&amp;quot;)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The following parameters are currently defined for use in Dovetail Agent:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;My Login Name - the login name of the user running the query     &lt;br /&gt;My First Name - the employee first name of the user running the query      &lt;br /&gt;My Last Name - the employee last name of the user running the query&lt;/p&gt;    &lt;p&gt;Current Date/Time - the data and time the query is run - used to find any date &lt;strong&gt;Before&lt;/strong&gt; the current time&lt;/p&gt;    &lt;p&gt;This Year - this evaluates to January 1 of the current year (12:00 AM) - used to find any date &lt;strong&gt;Since&lt;/strong&gt; the start of the current year      &lt;br /&gt;This Quarter - this evaluates to 1st day of the first month of the current quarter (12:00 AM) - used to find any date &lt;strong&gt;Since&lt;/strong&gt; the start of this quarter      &lt;br /&gt;This Month - this evaluates to 1st day of this month (12:00 AM) - used to find any date &lt;strong&gt;Since&lt;/strong&gt; the start of this month      &lt;br /&gt;This Week - this evaluates to Sunday day of this month (12:00 AM) - used to find any date &lt;strong&gt;Since&lt;/strong&gt; the start of this week&lt;/p&gt;    &lt;p&gt;Last Month - this evaluates to all of last month - used to find any date &lt;strong&gt;During&lt;/strong&gt; the month prior to the current month      &lt;br /&gt;Last Week - this evaluates to all of last week (Sunday thru Saturday) - used to find any date &lt;strong&gt;During&lt;/strong&gt; last week&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Evaluating the Parameters&lt;/h3&gt;  &lt;p&gt;All of the user parameters are evaluated against the current Session object that is created during the login process. The user login_name and employee first and last name for the user are both properties of the session object, so that information is easily accessed at run-time.&lt;/p&gt;  &lt;p&gt;All of the date parameters are evaluated at run time against the server clock. The current date is retrieved from the system clock, and then the proper date comparisons are built based on the criteria defined for the parameter. The SQL that is generated allows for SQL server and Oracle differences.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Implementing the New Feature&lt;/h3&gt;  &lt;p&gt;Once you have installed or upgraded to Dovetail Agent 4.1, you can get started with run-time parameters. The best way to understand this feature is to add or modify a query and put it to use. Any fcQuery object that has a date property can be used to get familiar with the run-time parameters. On the fcQuery Edit form, just select the date column, and the Substitution Values will be shown in a new drop-down list for selection. When one of the values is chosen from the list, the operator gets set to the correct option, and the clause can be added to the query. Finish the edits and save the changes, then use the Find button to see the results.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Summary&lt;/h3&gt;  &lt;p&gt;This new feature will be very useful when building queries for time-sensitive analysis. In previous versions, this type of query required the use of changeable properties, which had to be altered manually every time the query was executed. Now, the query can be built using the run-time evaluation parameters, and the targeted information will always included correctly without user intervention.&lt;/p&gt;  &lt;p&gt;This will also be helpful when building queries to be shared with other users. The current user parameters can be used in the query, and any user that runs the query will see their own data without having to type in their login name when they run the query.&lt;/p&gt;  &lt;p&gt;As part of the continuous effort to enhance and improve our applications, we welcome any comments or suggestions about this new feature.&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11483" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/Dovetail+Agent/default.aspx">Dovetail Agent</category></item><item><title>Spell Check feature added to Dovetail Agent</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/08/26/spell-check-feature-added-to-dovetail-agent.aspx</link><pubDate>Tue, 26 Aug 2008 18:45:00 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11435</guid><dc:creator>styson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11435.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11435</wfw:commentRss><description>&lt;p align="left"&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/SpellCheckfeatureaddedtoDovetailAgent_E890/image_6.png"&gt;&lt;img src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/SpellCheckfeatureaddedtoDovetailAgent_E890/image_thumb_2.png" style="border-width:0px;margin:0px 0px 0px 10px;" alt="image" width="451" align="right" border="0" height="314"&gt;&lt;/a&gt;As part of the continuous effort to enhance and improve our applications, a new Spell Check feature was added for the next release of Dovetail Agent. &lt;/p&gt;  &lt;p align="left"&gt;This feature was added for every text area input in the pages of Agent. Currently there are almost 100 different pages in Dovetail Agent that use text area controls. Adding the new functionality to every page individually would be one way of implementing the change, but certainly not the most efficient. Instead, the new functionality is added dynamically to each page as it is opened in the browser. This approach makes a lot of sense. Since the code that adds the link under each text area is contained in one file, any future modifications will be very easy as well.&lt;/p&gt;  &lt;p align="left"&gt;The Spell Check feature is made available to the user by adding a &lt;u&gt;&lt;i&gt;Check Spelling&lt;/i&gt;&lt;/u&gt; link under each text area control. jQuery is used to make this addition dynamically on each page that has a text area control, and will only add the link under a text area that is not "disabled" or marked as "Read-Only". Adding the jQuery module dynamically to every page also opens up a lot of other changes that are easier to implement.&lt;/p&gt;  &lt;p align="left"&gt;On each page in Dovetail Agent where an entry has been made into a text area, clicking on the &lt;u&gt;&lt;i&gt;Check Spelling&lt;/i&gt;&lt;/u&gt; link will activate the Spell Check process. This process will analyze the contents of the text area, and if corrections are suggested the Spell Check window will be opened. The user then has the tools to correct the spelling as necessary, and any changes made will be reflected in the contents of the text area when the Spell Check window is closed.&lt;/p&gt;  &lt;p align="left"&gt;If no other corrections are suggested, then the &lt;u&gt;&lt;i&gt;Check Spelling&lt;/i&gt;&lt;/u&gt; link changes to inform the user that the Spell Check is complete, as shown to the right. Changing the contents of the text area will revert the &lt;u&gt;&lt;i&gt;Check Spelling&lt;/i&gt;&lt;/u&gt; link back to its original state, ready to check the spelling again.&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/SpellCheckfeatureaddedtoDovetailAgent_E890/image_4.png"&gt;&lt;img src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/SpellCheckfeatureaddedtoDovetailAgent_E890/image_thumb_1.png" style="border-width:0px;margin:10px 5px 5px 0px;" alt="image" width="244" align="left" border="0" height="237"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/SpellCheckfeatureaddedtoDovetailAgent_E890/image_12.png"&gt;&lt;img src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/SpellCheckfeatureaddedtoDovetailAgent_E890/image_thumb_5.png" style="border-width:0px;margin:10px 0px 5px;" alt="image" width="316" align="right" border="0" height="237"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;  &lt;p align="left"&gt;&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11435" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/shortcuts/default.aspx">shortcuts</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/jQuery/default.aspx">jQuery</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/Dovetail+Agent/default.aspx">Dovetail Agent</category></item><item><title>Opening View Objects from Query Results</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/08/07/opening-view-objects-from-query-results.aspx</link><pubDate>Thu, 07 Aug 2008 22:09:15 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11412</guid><dc:creator>styson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11412.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11412</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/OpeningViewObjectsfromQueryResults_EC4F/image_6.png"&gt;&lt;img style="border-right:0px;border-top:0px;margin:0px 0px 0px 5px;border-left:0px;border-bottom:0px;" height="484" alt="image" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/OpeningViewObjectsfromQueryResults_EC4F/image_thumb_2.png" width="566" align="right" border="0" /&gt;&lt;/a&gt; In Dovetail Agent, it is very easy to build a query against a table in the database, and there are standard routines to open most of the table objects to view the items returned in the query. Drilling down to view objects is a little tougher, but it can be done in a few easy steps.&lt;/p&gt;  &lt;p&gt;In this example, I will show you how to build a query object for the queelm_case view, which will allow us to open each of the cases in the queue for inquiry. Building the fcQuery object in Dovetail Admin is the first step, so follow along.&lt;/p&gt;  &lt;p&gt;After logging in to Dovetail Admin, click on the fcQuery Objects menu link to open the &lt;strong&gt;Manage fcQuery Objects&lt;/strong&gt; page. Typing in &lt;font color="#0080ff"&gt;queelm_case&lt;/font&gt; and clicking the &lt;em&gt;List&lt;/em&gt; button locates the view object, and double-clicking the &lt;font color="#0080ff"&gt;queelm_case&lt;/font&gt; row will add the object to the list of fcQuery objects for editing. This screen-shot to the right shows what the screen looks like after this step.&lt;/p&gt;  &lt;p&gt;For a view, it is important to indicate what javascript function will be used to open the base object of the view. For this view it is easiest to use the OpenCaseWindow function, which is located in the &lt;em&gt;code/open_window.js &lt;/em&gt;file in Dovetail Agent. To add this functionality, click on the &lt;font color="#0080ff"&gt;queelm_case&lt;/font&gt; row in the grid, enter &lt;font color="#0080ff"&gt;OpenCaseWindow('$objid$'); &lt;/font&gt;&lt;font color="#000000"&gt;in the &lt;em&gt;Open Function &lt;/em&gt;text box, and click the &lt;em&gt;Save &lt;/em&gt;button.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The next step is to open the &lt;font color="#0080ff"&gt;queelm_case&lt;/font&gt; object from the grid and add the columns that need to be shown in the query results. Click on the &lt;font color="#0080ff"&gt;queelm_case&lt;/font&gt; row in the grid, then click on the &lt;em&gt;Open &lt;/em&gt;button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/OpeningViewObjectsfromQueryResults_EC4F/image_4.png"&gt;&lt;img style="border-right:0px;border-top:0px;margin:5px 0px 0px 5px;border-left:0px;border-bottom:0px;" height="484" alt="image" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/OpeningViewObjectsfromQueryResults_EC4F/image_thumb_1.png" width="507" align="right" border="0" /&gt;&lt;/a&gt; The most important field to add in this example is the &lt;font color="#0080ff"&gt;elm_objid&lt;/font&gt; field. This field is what maps to the unique identifier of the case record, known as its objid. The tricky part is to make sure it gets indicated as the Record Id field when it is added as a column.&lt;/p&gt;  &lt;p&gt;Adding the other columns follows the normal process, choosing the field by clicking the &lt;em&gt;Path &lt;/em&gt;button and finding the desired field, picking the field by double-clicking it, then using the &lt;em&gt;Quick Add &lt;/em&gt;button or setting the properties and clicking the &lt;em&gt;Add &lt;/em&gt;button.&lt;/p&gt;  &lt;p&gt;I chose to add a few other columns from the view regarding the cases, and the final fcQuery Object Columns are shown to the right.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Executing a query based on this object in Dovetail Agent will give me a list of all cases that are currently in queues, and when I double-click on a row in the results window the Case window will be opened so I can view all of the details of the case.&lt;/p&gt;  &lt;p&gt;Without specifying the Record Id and Open Function in Dovetail Admin the view does not have enough information to know how to present the detailed view of the case.&lt;/p&gt;  &lt;p&gt;Query objects provide a lot of power to Dovetail Agent users, and being able to get the most out of each query helps improve the efficiency of your applications.&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11412" width="1" height="1"&gt;</description></item><item><title>jQuery = Simplification</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/07/11/jquery-simplification.aspx</link><pubDate>Fri, 11 Jul 2008 19:54:19 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11358</guid><dc:creator>styson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11358.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11358</wfw:commentRss><description>&lt;p&gt;&lt;font size="2"&gt;I came across this code today, and it took me a second to figure out what it was doing:&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0080c0" size="2"&gt;strSortOrder = document.getElementById(&amp;quot;ad&amp;quot;).options[document.getElementById(&amp;quot;ad&amp;quot;).selectedIndex].value;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2"&gt;To break it down, it locates a Select control on the page (FindElementById), finds the element again and gets its selected value's index (selectedIndex), and sets the variable to the value of the option at the specified index (options[index].value).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;There is a &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; plugin that really simplifies this process. Using &lt;a href="http://www.texotela.co.uk/code/jquery/select/"&gt;jquery.selectboxes.js&lt;/a&gt;, the code now is as simple as this:&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0080c0" size="2"&gt;strSortOrder = $(&amp;quot;#ad&amp;quot;).selectedValues();&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2"&gt;This code now does the same thing, but it is also easy to read, and understand. It shortened from 86 characters to 26, and now requires no explanation.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;There are many different cases where jQuery can simplify the code.      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11358" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/tech/default.aspx">tech</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/customization/default.aspx">customization</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/jQuery/default.aspx">jQuery</category></item><item><title>Manage Queue Membership: Making It Easier</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/07/01/manage-queue-membership-making-it-easier.aspx</link><pubDate>Tue, 01 Jul 2008 19:31:53 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11340</guid><dc:creator>styson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11340.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11340</wfw:commentRss><description>&lt;p align="justify"&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipMakingItEasier_A606/qOld_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;margin:0px 5px 15px 0px;border-right-width:0px;" height="484" alt="qOld" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipMakingItEasier_A606/qOld_thumb.png" width="335" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Dovetail Software, Inc.&lt;/strong&gt; recently recently received a request from one of our customers to make Queue Membership Management easier and more efficient to use. The screen image to the left shows the Manage Queues form in &lt;em&gt;Dovetail Admin, Version 2.5&lt;/em&gt;. When a queue is selected at the top of the form, its current members and supervisors are displayed at the bottom right of the Membership tab.&lt;/p&gt;  &lt;p align="justify"&gt;Adding or changing members and supervisors was done one by one, and with only the login name for each user to determine the identity of each user. The login names are unique, but it can be hard to tell users apart based on login name alone.&lt;/p&gt;  &lt;p align="justify"&gt;The new requested functionality to make queue management easier includes adding the first and last name for each user, and allowing multiple users to be added or removed at one time.&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipMakingItEasier_A606/qNew_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;margin:5px 5px 5px 10px;border-right-width:0px;" height="484" alt="qNew" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipMakingItEasier_A606/qNew_thumb.png" width="324" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;The new version of the screen shows the changes. There is now more information for each user, and the checkboxes on each row of the grids give an indication that multiple users can be moved at the same time. &lt;/p&gt;  &lt;p align="justify"&gt;Users are selected by clicking on each row in the grids. The arrow keys in the middle of the tab are still used to add the selected users to the desired groups, and all of the business rules still apply to each one of the selected users.&lt;/p&gt;  &lt;p align="justify"&gt;From the administrator's point of view, the forms don't look much different other than the first and last names, but the added functionality will make member management easier. That was the real goal.&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;The other interesting part is what it looks like from a developer's point of view. Changing the functionality of the forms is an opportunity to update the technology, and in this case it makes a big difference. For more details on the development and a look at some of the code, take a look behind the user interface and &lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/07/01/manage-queue-membership-behind-the-user-interface.aspx" target="_blank"&gt;read this post&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11340" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/customization/default.aspx">customization</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/Dovetail+Admin/default.aspx">Dovetail Admin</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/jQuery/default.aspx">jQuery</category></item><item><title>Manage Queue Membership: Behind the User Interface</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/07/01/manage-queue-membership-behind-the-user-interface.aspx</link><pubDate>Tue, 01 Jul 2008 19:26:25 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11338</guid><dc:creator>styson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11338.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11338</wfw:commentRss><description>&lt;p&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;margin:0px 5px 5px 0px;border-right-width:0px;" height="484" alt="qOld" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipBehindtheUserInterf_BBBA/qOld_thumb.png" width="335" align="left" border="0" /&gt;The first step in making the changes was to add the first and last names to each of the membership grids. This simply required changing the data source for the user information from the user table to the empl_user view in both of the user grid pages. The grid_queue_mem.asp and grid_queue_mem2.asp pages each retrieve a list of records from the database, and build a table of user information from the results. &lt;/p&gt;  &lt;p&gt;Adding multi-select capability required much more change, so it was time to look for a better way to get the job done. This is where jQuery enters the picture. There is an excellent jQuery plugin available for grids, called jqGrid. There is a lot of capability available, and it allows us to simplify the code. &lt;/p&gt;  &lt;p&gt;In the previous version of the form shown above, there is an IFRAME for each of the grids on the form. For each IFRAME that is used, there is a separate ASP page that gets the records from the database, and builds the table that displays the information if each grid. &lt;/p&gt;  &lt;p&gt;Here is an example of the code that was used to build one of those grids:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;table id=&amp;quot;ver_tbl&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160; &amp;lt;tr style=&amp;quot;background-color: lightblue&amp;quot; class=&amp;quot;clsgrid&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;td nowrap class=&amp;quot;clsgrid&amp;quot;&amp;gt;&amp;lt;b&amp;gt;User&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;         &lt;br /&gt;&amp;#160; &amp;lt;/tr&amp;gt;         &lt;br /&gt;&amp;lt;%         &lt;br /&gt;&amp;#160; while(!boUser.EOF) {         &lt;br /&gt;%&amp;gt;         &lt;br /&gt;&amp;#160; &amp;lt;tr class=&amp;quot;clsgrid&amp;quot; id=&amp;lt;%=boUser(&amp;quot;objid&amp;quot;)%&amp;gt; defColor=&amp;quot;White&amp;quot; bgColor=&amp;quot;White&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; onclick=&amp;quot;BLOCKED SCRIPTGridRowClickHandler(this, 'ver_tbl', 'prev_grid_sel_row'); rowSel(this);&amp;quot; title=&amp;quot;Click Row to Select&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;td nowrap class=&amp;quot;clsgrid&amp;quot;&amp;gt;&amp;lt;% =boUser('login_name')%&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;         &lt;br /&gt;&amp;#160; &amp;lt;/tr&amp;gt;         &lt;br /&gt;&amp;lt;%         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; boUser.MoveNext();         &lt;br /&gt;&amp;#160; }         &lt;br /&gt;%&amp;gt;         &lt;br /&gt;&amp;lt;/table&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Any information about a selected user has to be moved back and forth between to main page and each grid. By clicking on a row, the objid of the selected row is saved to the parent form, as shown here:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier" size="2"&gt;&lt;font face="Courier New" color="#0000ff"&gt;function rowSel(thisRow) {          &lt;br /&gt;&amp;#160; parent.document.getElementById('userObjid').value = thisRow.id;           &lt;br /&gt;}&lt;/font&gt;         &lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipBehindtheUserInterf_BBBA/qNew_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;margin:0px 5px 5px 0px;border-right-width:0px;" height="484" alt="qNew" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/ManageQueueMembershipBehindtheUserInterf_BBBA/qNew_thumb.png" width="324" align="left" border="0" /&gt;&lt;/a&gt;The jqGrid plugin allows all of the controls on the page to be in one file, and loads the data into the grids with an AJAX call to the server. This eliminates the need to pass values from one form to its parent, and results in more maintainable code. The code required for the Member grid using jqGrid consists of setting up the grid columns and properties, and providing the URL for the AJAX call to get the data. Here is an example that shows the Members grid:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;$(&amp;quot;#memberGrid&amp;quot;).jqGrid({      &lt;br /&gt;&amp;#160;&amp;#160; url:&amp;quot;loadMembers.asp?queue=&amp;lt;%=queueObjid%&amp;gt;&amp;amp;type=mem&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160; datatype:&amp;quot;json&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160; colNames:[&amp;quot;user_id&amp;quot;, &amp;quot;Login&amp;quot;, &amp;quot;First&amp;quot;, &amp;quot;Last&amp;quot;],       &lt;br /&gt;&amp;#160;&amp;#160; colModel:[       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {name:&amp;quot;user_id&amp;quot;,index:&amp;quot;objid&amp;quot;,hidden:true},       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {name:&amp;quot;login_name&amp;quot;,index:&amp;quot;login_name&amp;quot;,width:70},       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {name:&amp;quot;first_name&amp;quot;,index:&amp;quot;first_name&amp;quot;,width:70},       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {name:&amp;quot;last_name&amp;quot;,index:&amp;quot;last_name&amp;quot;,width:70}       &lt;br /&gt;&amp;#160;&amp;#160; ],       &lt;br /&gt;&amp;#160;&amp;#160; hidegrid:false,       &lt;br /&gt;&amp;#160;&amp;#160; loadonce:true,       &lt;br /&gt;&amp;#160;&amp;#160; imgpath:&amp;quot;../code/jqGrid/themes/basic/images&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160; sortname:&amp;quot;login_name&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160; sortorder:&amp;quot;asc&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160; height:105,       &lt;br /&gt;&amp;#160;&amp;#160; width:225,       &lt;br /&gt;&amp;#160;&amp;#160; loadComplete: function(){       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; memTot = $(&amp;quot;#memberGrid&amp;quot;).getGridParam(&amp;quot;records&amp;quot;);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if(memTot == null) memTot = 0;       &lt;br /&gt;&amp;#160;&amp;#160; },       &lt;br /&gt;&amp;#160;&amp;#160; multiselect:true       &lt;br /&gt;});&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The loadMembers.asp page retrieves the data, and the grid control renders the information. Each grid has many properties that can be used to control its appearance and use. Another great benefit is that the columns can all be sorted and resized as needed. Setting the multiselect option to true as shown above is all that is required to allow multiple rows to be selected and processed. The checkbox for each row is generated automatically.&lt;/p&gt;  &lt;p&gt;In the previous version, the each user had to be moved one user at a time. By allowing multiple users to be selected, each time one of the arrow buttons is clicked all of the selected rows can be processed as a group. In this example, all of the selected rows from the User grid are processed and added to the Member grid, but not if the user is already there:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;var usersToAdd = $(&amp;quot;#userGrid&amp;quot;).getGridParam(&amp;quot;selarrrow&amp;quot;);      &lt;br /&gt;var currentMembers = $(&amp;quot;#memberGrid&amp;quot;).getDataIDs(); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;$.each(usersToAdd, function(i, objid) {      &lt;br /&gt;&amp;#160;&amp;#160; if($(currentMembers).index(objid) &amp;lt; 0) {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var userData = $(&amp;quot;#userGrid&amp;quot;).getRowData(objid);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&amp;quot;#memberGrid&amp;quot;).addRowData(objid, userData);       &lt;br /&gt;&amp;#160;&amp;#160; }       &lt;br /&gt;}); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;All of the data that is needed to complete this action is held within the grids themselves, eliminating the need for hidden controls to hold selected row identifiers. These hidden identifiers were updated in the previous version when each row was selected.&lt;/p&gt;  &lt;p&gt;Overall, there is much less code to maintain, and it will be much easier to customize and enhance in the future. &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;Previous Page&lt;/td&gt;        &lt;td&gt;Line Count&lt;/td&gt;        &lt;td&gt;New Page&lt;/td&gt;        &lt;td&gt;Line Count&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;queue_detail.asp&lt;/td&gt;        &lt;td&gt;528&lt;/td&gt;        &lt;td&gt;queue_detail.asp&lt;/td&gt;        &lt;td&gt;466&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;grid_queue.asp&lt;/td&gt;        &lt;td&gt;161&lt;/td&gt;        &lt;td&gt;LoadQueues.asp&lt;/td&gt;        &lt;td&gt;83&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;grid_queue_mem.asp&lt;/td&gt;        &lt;td&gt;97&lt;/td&gt;        &lt;td&gt;LoadUsers.asp&lt;/td&gt;        &lt;td&gt;29&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;grid_queue_mem2.asp&lt;/td&gt;        &lt;td&gt;113&lt;/td&gt;        &lt;td&gt;LoadMembers.asp&lt;/td&gt;        &lt;td&gt;57&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;grid_queue_sup.asp&lt;/td&gt;        &lt;td&gt;168&lt;/td&gt;        &lt;td&gt;(uses LoadMembers)&lt;/td&gt;        &lt;td&gt;-&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Total lines of code&lt;/td&gt;        &lt;td&gt;1,067&lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;635&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Taking advantage of the jQuery javascript library and plugins such as jqGrid allow for more focus on adding value to the application, and makes the product better and easier to both use and change.&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11338" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/customization/default.aspx">customization</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/Dovetail+Admin/default.aspx">Dovetail Admin</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/jQuery/default.aspx">jQuery</category></item><item><title>Other Cool Tools</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/04/14/other-cool-tools.aspx</link><pubDate>Mon, 14 Apr 2008 21:46:00 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11132</guid><dc:creator>styson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11132.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11132</wfw:commentRss><description>&lt;p&gt;I learned about a couple of other cool tools from J.P. Boodhoo last week, and thought I would pass them along.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Console2&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://sourceforge.net/projects/console/" title="http://sourceforge.net/projects/console/"&gt;http://sourceforge.net/projects/console/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is a replacement for the CMD shell. It is a tabbed window, and each tab can be defined as a different shell process.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Unlocker&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://ccollomb.free.fr/unlocker/" title="http://ccollomb.free.fr/unlocker/"&gt;http://ccollomb.free.fr/unlocker/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I just want to delete that folder... &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/OtherCoolTools_EBE2/image_2.png"&gt;&lt;img src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/OtherCoolTools_EBE2/image_thumb.png" style="border:0px none;" alt="image" border="0" height="79" width="244"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Grrrr... here comes Unlocker to the Rescue!&lt;/p&gt;  &lt;p&gt;Unlocker will pop up after you close the annoying pop-up window, and show you what programs have the file locked, and give you the option to easily free the file. Very nice UI to give you the control that you want (and need)!&lt;/p&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11132" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/tech/default.aspx">tech</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/shortcuts/default.aspx">shortcuts</category></item><item><title>Goodbye SlickRun! ...</title><link>http://blogs.dovetailsoftware.com/blogs/styson/archive/2008/04/14/goodbye-slickrun.aspx</link><pubDate>Mon, 14 Apr 2008 20:09:09 GMT</pubDate><guid isPermaLink="false">5c171a62-8cd2-4aac-8f20-46c3ac3f3269:11131</guid><dc:creator>styson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.dovetailsoftware.com/blogs/styson/comments/11131.aspx</comments><wfw:commentRss>http://blogs.dovetailsoftware.com/blogs/styson/commentrss.aspx?PostID=11131</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/GoodbyeSlickRun_D511/image_6.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="120" alt="image" src="http://blogs.dovetailsoftware.com/blogs/styson/WindowsLiveWriter/GoodbyeSlickRun_D511/image_thumb_2.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;... and hello &lt;a href="http://www.launchy.net/"&gt;Launchy&lt;/a&gt;. This is a minor replacement, but makes life at the keyboard even easier. Like a helpful side-kick, you can train Launchy to open any program with just a few shortcuts. This is the same as SlickRun, but without the magic keyword setup.&lt;/p&gt;  &lt;p&gt;You can easily change the configuration to use any hot-key combination for popping up Launchy, then just start typing the name of the program you are trying to launch. If you need to browse for it, it will help you traverse down the folder trees as you type folder names and hit tab for auto-completion.&lt;/p&gt;  &lt;p&gt;I am using it like this so far:&lt;/p&gt;  &lt;p&gt;vs - Visual Studio &lt;/p&gt;  &lt;p&gt;ue - UltraEdit&lt;/p&gt;  &lt;p&gt;ff - fireFox&lt;/p&gt;  &lt;p&gt;fl - Flare&lt;/p&gt;  &lt;p&gt;ie - Internet Explorer&lt;/p&gt;  &lt;p&gt;dt - &lt;a title="http://www.dovetailsoftware.com/" href="http://www.dovetailsoftware.com/"&gt;http://www.dovetailsoftware.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;iis - IIS Console&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Other cool stuff found under Tips and Tricks:&lt;/p&gt;  &lt;p&gt;Search Google &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Type in google, then tab, then your search query and press enter &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Check the Weather &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Type in Weather, then tab, then your zip code or city,state and press enter &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.dovetailsoftware.com/aggbug.aspx?PostID=11131" width="1" height="1"&gt;</description><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/tech/default.aspx">tech</category><category domain="http://blogs.dovetailsoftware.com/blogs/styson/archive/tags/shortcuts/default.aspx">shortcuts</category></item></channel></rss>