On 02/02/2013 12:31 AM, Marco Patzer wrote:
On 2013–02–02 Ingo Hohmann wrote:

I'm trying to have the date in a layer in an environment. In the
text using the environment, I want to be able to set the date.
If the date is not set, the current date should be used, otherwise
the set date.
This is what I've tried, but it is always the currentdate, that is
displayes.
You are trying to use the date before it is defined. You can use a
two-pass mechanism:

\define\mydate{\datasetvariable{mydata}{date}{date}}

Thank you Marco, this works.

Is it possible to update fields in the datasetvariables table, or is it only possible to replace the whole table?

\setdataset[data][info][date=\currentdate]
\setdataset[data][info][subject={subject}]

After the second line, the first value is gone.


Thank you,

Ingo


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to