.. _Macro_Syntax_Brackets: Macro Syntax Brackets --------------------- Macros can have any of the following markup: * ``{{`` and ``}}`` indicate macros that resolve to single values. The value can also return an object. A direction parameter is also available for hierarchy searching. This is indicated by ``||``. Refer to the topic on SELECT-FROM-WHERE type macros for details. Any number of single opening and closing brackets (``{`` and ``}``) can also occur inside these scalar macros. * ``{#`` and ``#}`` indicate macros that resolve to lists of values. * ``{%`` and ``%}`` indicate macros that resolve to dictionaries * ``((`` and ``))`` indicate macros that test for a condition are enclosed in round brackets (( and )) - these macros evaluate to True or False The comparison operators that are available for these macros are: ``==, !=, <, >, <=, >=``. The OR operator in a test is ``|``, for example: :: (( device.cuc.PagerDevice.Undeletable| ObjectId:input.ObjectId| direction:local == False )) * ``((test)) `` IF ELSE type conditional macro. * ``((test)) ((test)) `` IF ELSEIF ELSE-type macros combine tests and result values if the test resolves to True or False. The logic is IF (test) THEN ELSE IF (test) THEN ELSE . Example: :: ((self.a == self.b)) ((self.b == self.c)) This macro tests for the equality of values in a calling model (referenced by 'self') and returns an evaluation for the condition that is True. The evaluation refers in dot notation to attributes of a Data Model called 'CallManager' and concatenates the result with a string 'foo-'. * 'SELECT FROM WHERE'-type macros returning single-, dictionary- and list type values and can take parameters. The format is: * *{{ SELECT FROM \| WHERE }}* * *{% SELECT FROM \| WHERE %}* * *{# SELECT FROM \| WHERE #}* These types and their parameters are illustrated in the topic on 'SELECT FROM WHERE' Macros. .. |VOSS Automate| replace:: VOSS Automate .. |Unified CM| replace:: Unified CM