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.
Target¶
XPath¶
The following Target
uses XPath:
- Transaction
- Log
- Table Data
- Failed Routing Order
- Active Routing Order
- Complete Routing Order
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.
Script¶
Since 6.9.4
If the selected Target
is Script you must fill the Script
with the service item name.
Warning
The Script must write the value inside the pipeline variable platform6.response.value
as a Double
(or a string that could be converted to)
Example
p6.pipeline.put('platform6.response.value', "123")
Stored procedure¶
Since 6.9.7
If the selected Target
is Stored procedure you must fill the Stored procedure
with the service item name.
Warning
The Stored procedure must return a single line/column as a Double
(or a string that could be converted to)
Example
SELECT SUM(generatedColumn) FROM transactions WHERE datatype = 'TransactionInfo';
Expansion & parameters¶
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
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.