Runable Macros

Runable Macros

Runable Macros

Runable Macros is strings with JSON like syntax describe runable tasks. Use in main menu, report ConnectTo property, dashboard html widget (href, onclick).

Syntax start with ‘2/’ and rest follow JSON syntax, mean every macro object is start with '{' ends with '}' and has properties.
Every property has name (with low case only chars) enclosed with double quote eg “cmd” after ‘:’ and then value (if value is string then enclosed with double quote).
When macro object has params property defines its value as array of objects then values enclosed in ‘[‘ and ‘]’
You can get more informations about JSON syntax on json.org.

Follow six object detailed syntax with examples.

Form object
cmd: FRM
class: form class alias
caption: for caption used for display in some cases eg when popup menu on report view show available reports
key: BO ID to load or defkey: guid of “default values” Program use defkey value in case “key” is empty
Required cmd, class

Example: 2/{"cmd":"FRM", "class": "TFCustomer", "key":12502} ανοίγει τη φόρμα πελατών και φορτώνει τον πελάτη με id 12502

Report object
cmd :RPT
key: guid of desired report
caption: use for display in some cases eg when popup menu on report view show available reports
params: array of (report param name, param value)
layout: guid of desired layout
rReportOutDevice: n “where n is device codeid”
ShowUI: b “where b is boolean true/false”
Required cmd, key

Example: 2/{"cmd":"RPT", "key": "{00000000-0000-0000-0000-000000002739}"} ανοίγει την εκτύπωση ημερολόγιο αγορών
Example: 2/{"cmd":"RPT", "key":  "{00000000-0000-0000-0000-000000002739}",  "layout":"{AB74E5F0-D58D-455C-8BE6-E7111719D038}"}
ανοίγει την εκτύπωση  ημερολόγιο αγορών και φορτώνει και layout

Pivot object
cmd :PIV
key: guid of desired pivot
caption: use for display in some cases eg when popup menu on report view show available reports
params: array of (pivot param name, param value)
mapcode: code of desired map
Require cmd, key

Example: 2/{"cmd":"PIV", "key": "{00000000-0000-0000-0000-000000000064}"} ανοίγει τo Pivot Στατιστική Πωλήσεων

CellDetailMacro on Pivot design or Pivot runtime 
caption: use for display in some cases eg when popup menu on pivot view show available reports, forms, etc
values: array of values(field, filter (optional))
call: cmd call

**Filter use iter_intlist_to_table function to return only values that equals with filter_values list

Example: {caption:"Πελάτες", 
  values:{"field":"ID", filter:{field:"Id_rowtype", values:[1]}},
  call: {cmd:"FRM", class:"TFCUSTOMER", iterlist:{"key":"ID"}}
} 

Action
cmd :ACT object
key: guid of desired action
caption: use for display in some cases eg when popup menu on report view show available reports
params: array of (action param name, param value)
Require cmd, key

Example: 2/{"cmd":"ACT", "key": "{DDE4E5F0-FE00-0000-0000-000000000EF4}"} ανοίγει τo action αλλαγή τιμής πώλησης

BO import
cmd :BOI object
key: guid of desired BO Import
caption: use for display in some cases eg when popup menu on report view show available reports
params: array of (BO Import param name, param value)
Require cmd, key

Example: 2/{"cmd":"BOI", "key":  "{AFE125DD-FE00-0000-0000-000000000EDA}"} ανοίγει τo ΒΟ import εισαγωγή  παραγγελιών απο το site μου

Shell Command
cmd :SHL object
executable: full path name of executable file
caption: used for display in some cases eg when popup menu on report view show available reports
params: any param needed by executable
Require cmd, executable

Example: 2/{"cmd":"SHL", "executable": "notepad.exe",  "params":"c:\myfile.txt"} ανοίγει τo notepad και φορτώνει το αρχείο  myfile.txt
Was this article helpful to you? Yes No

How can we help?