[DIALOG.myint%08i] and [DIALOG.myint %08i] are equivalent.Shorthand notationIn some cases the namespace prefix alone can be used as a macro if a field value is used in an expression that involves the same field name. This is currently possible for [DIALOG.xxx] values when the macro occurs immediately after the equality operator (SQL) or colon operator (Lucene):•In SQL-based views, myfield = [DIALOG] is equivalent to myfield = [DIALOG.myfield].•In full-text views, myfield: [DIALOG] is equivalent to myfield: [DIALOG.myfield].
Anygraaf Neo System Configuration GuideMacro notationIn default value stringssimilar shorthand notation is possible after the assignment sign.The shorthand notation is not available when a formatting parameter is present, so the following does not work:xxx: [DIALOG%015i]Expression macrosThese macros can occur in strings that are written in some special language, such as in SQL or Lucene queries. The expansion result is not a single value but may be any string that is a legal construct in the surrounding language.Macros of this kind begin with a number sign (#), this is followed by the macro name (case insensitive) and possible parameters in parentheses.The currently available expression macros all take a single parameter, which is a variable name in form <namespace>.<variable> just as with Variable macros.
Anygraaf Neo System Configuration GuideMacro notationMacroMeaning and notes#HIERARCHY(variable)For building SQL queries that perform a search by hierarchical keywords (IDs from table BT_HIERARCHYKEYWORD).Assuming that the search window contains a field “keywords” for selecting keywords IDs, #HIERARCHY(DIALOG.keywords) expands to a SELECT statement that returns the IDs of the selected keywords, and of all their sub-concepts. The macro result does not include enclosing parentheses so the macro itself must be put in parentheses. Typical usage:SELECT A.name FROM cm_text A WHERE A.id IN (SELECT cm_text_id FROM bt_hierarchykeyword_cm_text_msWHERE bt_hierarchykeyword_id IN (#HIERARCHY(DIALOG.subjectHierarchy)))#HIERLEVELS_ANY(variable)Builds a Lucene index query for finding documents that have at least oneof selected hierarchical keywords. The LEVELS word in the name refers to the fact that each hierarchy level of a selected keyword is used as a search term; these terms are combined with AND logic.Assume that the search window contains a field “keywords” for selecting keywords. If the user has selected keywords aaa/bbb/ccc and ddd/eee, macro #HIERARCHY(DIALOG.keywords) expands to(("aaa" AND "bbb" AND "ccc") OR ("ddd" and "eee"))Typical usage:SELECT name FROM text WHERE keywords:#HIERLEVELS_ANY(DIALOG.subjectHierarchy)For the macro to be meaningful, the “keywords” field in the index must have been built so that the AND/OR logic above returns the correct results.