PDA

View Full Version : Substitution Tokens


mikeg
09-05-2009, 07:15 AM
Originally posted by nil
http://www.kinook.com/Forum/showthread.php?threadid=2144

4. Dynamic Item titles using either Linked attributes, or a custom attribute values, similar to the contact object.

4a. A way to automatically set the title of the object to the current date.

5. Dynamic Templates: Integration of some kind of scripting, or even variable substitution, allowing for instance, $DATE$ within a template to automatically be set to the current date. With UR 4 released and the possibility of new features reopened, I'd like to revive this suggestion. I could swear I made a similar suggestion, but can't find it. Anyway I think all of the items above are related and call for variables or tokens that will automatically be replaced with a specific value when used in an item or template. They could be edited inline the same way hyperlinks are edited.

We could start off with a few basic substitution tokens such as @@DATE_DD@@ (or any token identifier that would not be mistaken for user data). This, for example, could be placed in a journal entry template's item title attribute to finally get automatic day of month. Another example: @@ITEM_TITLE@@ which could be placed in the Text item template to get the title to automatically appear in the upper left of every text item. Yes, it's redundant, but I often enter this manually so I don't have to keep glancing over at the tree to verify which item I'm working in.

Substitution tokens is one my top remaining wishes for UR!

$bill
09-05-2009, 07:26 AM
Originally posted by mikeg
[a token identifier] could be placed in a journal entry template's item title attribute to finally get automatic day of month.
Although not implemented using your suggested token substitution method, a mechanism for automatic day-of-the-month in a template's title attribute is already present.

http://www.kinook.com/UltraRecall/Manual/custom_item_titles.htm

Create a new template Journal Entry, set its Title Expression to Date Created.

I would like to see further expansion of these calculated fields and see the utility of using a token identifier to insert the value of an attribute into a document.

kinook
09-07-2009, 08:05 AM
Custom item titles based on other attributes values and automatic titling of an item to the current date is supported as mentioned by $bill.

Another way to title the item with the current date is via Edit | Insert Date+Time[i] (Alt+Z) in the tree (use [i]Tools | Options | Miscellaneous | Insert Date/Time As to control the format), or after inserting an item use Item | Rename To | Date.

The variable substitution of attributes in the template text is a good idea which we'll add to the request list (seems to have been overlooked when first suggested by nil).

wordmuse
09-11-2009, 10:39 PM
If I can add a wrinkle to this - if there was a way to make the first line before a paragraph break be the title of the item, that would be very cool for some applications.

- Bal

mikeg
10-12-2009, 05:40 PM
Thanks $bill and Kinook. I hadn't yet discovered or explored Attributes and Title Expressions or even tried inserting a new child item using Insert Date and Time from the menu. I had tried using ALT-Z to insert the date and time in an item title, but that just kicks you out of title edit mode.

Using Date Created in the Title Expression of the Journal Entry works like a charm. Amazing to see all the power buried inside Ultra Recall. Still trying to understand the instructions for changing the date format, but I'm sure it'll come after a little experimentation...

mikeg
05-06-2010, 06:32 AM
Originally posted by kinook
The variable substitution of attributes in the template text is a good idea which we'll add to the request list... [/B] Excited about this one. I'm hoping it will finally allow me to include item title in the template as the first line of every text item. Will variable substitution support basic expressions and/or formatting attributes? That would be truly powerful, but perhaps a lot of work to implement.

For now I'm mainly focused on using it to automate steps I do manually for virtually every text item. In addition to copying item title to the first line, I set it to my Heading style, then add a couple blank lines in normal style. At that point, I can finally start entering notes.

P.S. I know I can include blank lines in the template now. Just wanted to describe all the steps...