News:IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).

I have a document that organizes various reports with names like "UK 7", i.e. a two-letter country code followed by a space followed by a number. I also have two attributes: NB is supposed to hold the country code, and Number holds the number. Originally (i.e. before 4.6) I used an agent to set those two attributes from the title. Essentially, the agent's query was Title((\w\w)\s+(\d+)), and the action was NB=$1;Number=$2. With 4.6 this stopped working: the regular expression doesn't match any note names. Title(.*) matches notes, but if I try to use anything more sophisticated, nothing matches. What do I need to do?

Odd, I tested Title((\w\w)\s+(\d+)) in v4.5.3 and it fails - as I'd expected as we use Name() and not Title() to search the notes name. It may be that way back TB supported Title as an alternate for Name() though I was never aware of that. So you need:

Query: Name((\w\w)\s+(\d+))Action: $NB=$1;$Number=$2

In v4.6+ we now prefix all references to attribute names on both sides of the operator with a '$'. TB will support legacy forms at present, but learn to change now as such support is likely to fall away over time. We also always quote literal test values being applied to string attributes.

Using the $ prefix in queries is a little more complex confusing. As, in v4.6, queries are now expressions, we should (may!) prefix all attribute names except when pattern matching like above; i.e. attribute(pattern string). So, this works: