home
 
 
 
Look-up Values
There are certain types of information that might appear in a variety of documents, but which might change with time, and it's inconvenient to have to update all of the documents. For instance, it might be useful to specify a person's name as a point-of-contact for a particular project, and that name might appear in all of the documents pertaining to the project, but it might change. As another example, documents might contain prices that might change. To alleviate the need to manually keep track of all of this, QDL allows you to specify a look-up value, where the value is stored in another document, and referenced by post number and item number. To use this feature, you first have to set up the source document, with a table containing the values. The first column has to contain the item number that you will specify (in whatever format you desire), and the second column has to specify the value that will appear. For example, here is a look-up table that will work:
# display description
1 Akhenaten's tenure as pharaoh of Egypt
2 John Smith point-of-contact for the Project From Hell
3 $11,573.99 computer-controlled weed whip
Once this table is created and saved, its values can be referenced by post number and item number. For example, the present post number is 12856. To get item number 2 to appear in another document, the syntax is...
{ { LU: 12856: 2 } }
...but without the spaces before and after the curly braces (or QDL wouldn't show the syntax, but rather, the result, as in here... John Smith). So you can actually reference the present post, or any other post you want. Just make sure that the referenced post has only one table, and that the item numbers are unique in that table.
 
If the value is numeric, and you want it to be displayed in scientific notation, use "LS" instead of "LU". For example, this...
{ { LS: 8906: proton mass } }
...displays as this...
1.67 × 10−27
Note that this works well for small tid-bits of information, without any special formatting. For more extensive referencing, such as a standard footer that will appear at the bottom of all documents, and which might have some formatting, it's easier to have the information that will appear in its own post, and to include the entire post in the target document, as an internal link, with the following configuration:
 
 
Template Link

← PREV Powered by Quick Disclosure Lite
© 2010~2021 SCS-INC.US
NEXT →