Counters User Interface¶
To see the Counters menu entry on P6 Portal, the counters=view
permission is required.
For a summary of permission names and uses related to this service, please refer to this section.
Note
If you have the counters=*
permission, you can have access to all the functions mentioned below.
View the counters¶
To list and display the counters, the counters=read
permission is required.
If your permission has values like this: counters=read('Counter 1', 'Counter 2')
, you will only see the listed counters, i.e. Counter 1 and Counter 2.
You can view a counter by clicking on the magnifier icon.
Edit a counter¶
To create, update, rename, duplicate, delete, export or import a counter, the counters=edit
permission is required.
Double-click on the counter associated line to access the edit form. You can update the counter’s name, description, target, type and query.
Warning
The counter’s name and the English description are mandatory and cannot be empty.
The query is the XPath (XML Path Language) expression which will be run when the counter is synchronized. This field is mandatory and cannot be empty.
If the selected Target
is Script or Stored procedure you must fill the service item name.
Warning
Script must write the value inside the pipeline variable platform6.response.value
Stored procedure must return a single line/column
Both must return a Double
(or a string that could be converted to)
Tip
You can pass parameters to the script
or stored procedure
by suffixing the item name with ?param1=fee¶m2=foo
On both you can use date time variable expansion
Example
appkey.storedname?datemin=${DATE-30d}&datemax=${DATE+30d}&status=Sent
Example
p6.pipeline.put('platform6.response.value', "123")
SELECT SUM(generatedColumn) FROM transactions WHERE datatype = 'TransactionInfo';
Synchronize a counter¶
With the counters=edit
permission, you can also synchronize (re-calculate or refresh) counters.
There are various ways to synchronize counters from the UI: either clicking the icon displayed in the ‘Synchronize’ column, or from the ‘View’ tab or from the ‘Edit’ form.