****contributors note --these changes were included in release 1.07 but my usage notes never made it into the documentation so I've put it here so that it could be found if the mailing list archives were searched***
 
For the QueryData and TableData tags , to acheive the a result such as

   *            001-Description 1 [2002-03-15]
   *            002-Description 2 [2000-03-11]

   You would use-
   
               <db:queryData name="myQuery" query="SELECT
   ID,ID,DESCRIPTION,DATE FROM TABLE" format="s-s [s]"> />
   </db:select>
   

   If no format attribute is specified the default will be a comma seperated list as was
originally done

   *            001, Description 1, 2002-03-15
   *            002, Description 2, 2000-03-11

    THERE ARE THREE THINGS TO KEEP IN MIND

   1)  The format should begin with an 's'.  In other words, format="--s-s [s]" won't put
"--" before the first element and will goof up the second.

   2) There should be as many "s" in the format as you have display fields.  The following
will produce an error <db:queryData name="myQuery" query="SELECT
   ID,ID,DESCRIPTION,DATE FROM TABLE" format="s [s]"> />
   </db:select>. You need one more "s" in the format attribute in this case.
    
   3) And obviously, "s" can only be used in the format to indicate a display field. For
example, ...format="s- description=s- [s]" won't produce the desired results and the 's' in description will be seen as a marking place for a display field.
 
Shawn

Reply via email to