DIALOGmyint08i and DIALOGmyint 08i are equivalent Shorthand notation In some

Dialogmyint08i and dialogmyint 08i are equivalent

This preview shows page 6 - 9 out of 12 pages.

[DIALOG.myint%08i] and [DIALOG.myint %08i] are equivalent. Shorthand notation In 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].
Image of page 6
Anygraaf Neo System Configuration Guide Macro notation In default value strings similar 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 macros These 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 .
Image of page 7
Anygraaf Neo System Configuration Guide Macro notation Macro Meaning 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_ms WHERE bt_hierarchykeyword_id IN (#HIERARCHY(DIALOG.subjectHierarchy))) #HIERLEVELS_ANY( variable ) Builds a Lucene index query for finding documents that have at least one of 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.
Image of page 8
Image of page 9

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture