[|PhaseMasks]]]
l
^ Parameters Start
l
<> Mandatory Parameter
l
[] Optional Parameters
An example of the Field Configuration is …
RO_CSSLValue^2|TP|0|{EndPeriod}
Where {EndPeriod} will be populated from the Body Selector.
Populating body selectors from generic lookup tables
There are some generic 'Body Selector' fields which will enable you to be able to populate a
body selector via the use of one of the generic lookup tables (ie co_table,sy_table or cr_
31-May-2017 Construction Industry Solutions
Page 278 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
table).
Syntax
There is a field for looking at records held in :
l
sy_table coc-rsp.UDSYCombo^{Name of sta_rtype}|[{Name given to Blank record}]
l
co_table coc-rsp.UDCOCombo^{Name of cta_rtype}|[{Name given to Blank record}]
l
cr_table coc-rsp.UDCRCombo^{Name of ctr_rtype}|[{Name given to Blank record}]
For situations where a company 0 is in use, additional optins are available:
l
co_table coc-rsp.UDCOCombo0^{Name of cta_rtype}|[{Name given to Blank record}]
l
cr_table coc-rsp.UDCRCombo0^{Name of ctr_rtype}|[{Name given to Blank record}]
Examples:
31-May-2017 Construction Industry Solutions
Page 279 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 280 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.6 Page Forms - Body Span
A Body Span will provide additional title and column labels to the screen.
Add in a Body Span Form Type and then add Page Fields against the Body Span Type. Against
the Body Span field enter a Label and in Column Span add how many columns this Label
should extend over.
A summary style header will now appear on the Enquiry Screen.
31-May-2017 Construction Industry Solutions
Page 281 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.7 Page Forms - Body Update
A Body Detail defines the fields to update in an extra frame below a browse line.
31-May-2017 Construction Industry Solutions
Page 282 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.8 Page Forms - Context
The context appears immediately below the title bar.
It provides the context of the record you are viewing, with links to the parent record(s). It is
non-updateable and is generated automatically (although you can override it).
31-May-2017 Construction Industry Solutions
Page 283 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.9 Page Forms - Detail
A Detail form defines the fields to display on a separate page.
31-May-2017 Construction Industry Solutions
Page 284 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.10Page Forms - Footer
A summary form (containing header table information) after the body. It is the same as a
header, only at the bottom.
31-May-2017 Construction Industry Solutions
Page 285 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.11Page Forms - Header
A Header appears at the top of the page immediately underneath the page context area. It is
intended to further or better describe the header record(s) of this page. It can also be used to
show a summary page.
31-May-2017 Construction Industry Solutions
Page 286 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.12Page Forms - Multiple Update
A Multiple Update form provides a separate form that allows you to update several fields on
multiple (selected) records at the same time (using the Multi-update button). Do this by
creating a multi-update form and adding the fields you want to update.
If the values on all records are the same then the default is set for the update and the update
check box is ticked.
If any record values are different then the value is not set and neither is the check box to do
the update.
31-May-2017 Construction Industry Solutions
Page 287 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.13Page Forms - Record Header
A Record Header appears above tabs in Update or Detail. It allows you to put record context
(as opposed to parent context) above the record you are updating. It can also include fields
that are updateable. The record header appears above any tab folders that are specified and
is therefore visible on each tab. This would be useful say on a maintenance screen where the
code and description are put in the record header and the other fields in the tab section.
31-May-2017 Construction Industry Solutions
Page 288 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.14Page Forms - Totals
Provides a totals form for a browse. If you total a non-integer/decimal field you will get a
field count, otherwise you will get the sum of the value displayed.
Totals can also be placed at the bottom of the columns. On each field of a page section there
is a field Total: . If ticked and you create a Total form, the total for the column will be placed
in a total line at the end of the body section when the total button is pressed. Any fields
added to the total form are then presented under this body total line. A record count is
placed in the first column (selection/filter section).
31-May-2017 Construction Industry Solutions
Page 289 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.5.15Page Forms - Update
An Update form defines the fields to update on a separate page.
31-May-2017 Construction Industry Solutions
Page 290 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.6 Page Fields Tab
This tab allows you to specify which fields appear on each of the forms on the page.
Page Selectors:
Field
Form
Description
Select the page form that you want to enter or update fields for.
Make sure that you have defined the appropriate page form using Page
Form Maintenance.
View
When you click Open or view detail, the additional fields can be shown in a
Linear form (Standard), or arranged in groups of like fields (Grouped)
Fields:
Field
Field
Description
The name of the field in the field set.
Leave this blank to display text only (for example, a table heading).
Label
The label for the field.
This will be either a column heading or a side label, depending on how the
31-May-2017 Construction Industry Solutions
Page 291 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Width
field is used.
The column width as a percentage of the width of the page (for browsers).
Height
The height of the field.
Function
The code for a function to link to from this field (optional).
Add
Whether the field is available for update when adding a new record.
Upd
Whether the field is available for update when updating an existing record.
View As
How the information in the field is presented to the user.
Layout
View As options
The function code for the tab this field is displayed on (if the page is divided
into tabs).
The layout that this field is to be used in.
Append
Whether this field is appended to the previous field.
Tab
l
On Detail or Update pages, an appended field is displayed after the
previous field, on the same line.
On Body pages, an appended field is stacked below the previous field
Whether the field is hidden from the user when the screen is first displayed.
l
Hidden
You can use this:
l
l
To update a field, such as an internal reference, that the user does not
need to see. Whatever is in the field gets saved and sent.
To hide a field that is only required in certain circumstances. For
example, an "amount liable to VAT" field which only applies to VAT lines.
You could use a JavaScript function in the OnOK of another field to make
this field visible.
Additional Fields (Grouped View)
31-May-2017 Construction Industry Solutions
Page 292 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Additional Fields (Standard View)
Additional Fields:
Field
Span Label
Label Column Spans
Description
Span label level 1, Level 2 & Level 3
The number of columns the label for this field takes up.
31-May-2017 Construction Industry Solutions
Page 293 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
If you put a label on an appended column-spanned field then the label is not
shown. If you enter a number in the Label Column Spans field then the label
is shown and will span that number of columns.
Column Spans
The number of columns this field takes up.
On a web screen, fields are cells in a table, and each cell can span more than
one column. The total number of columns depends on the line with the
largest number of 'column spans' (including appended fields).
Row Spans
Number of rows to span.
Mandatory
Whether this is a required field (that is, it cannot be left blank during input).
No Break Label
Select to prevent a label from being split on to multiple lines
Show in Help
Whether the help frame includes help for this field. Clear this box, for
example, if the field is never visible to the user.
Alignment
How the field is aligned. The default alignment depends on the data type of
the field.
Format
A PROGRESS display format that overrides the standard formatting for the
field.
Class
The standard style sheet class for this field.
By default, the text is appended to the underlying class name of the cell. For
example, "bold" could be appended to the standard classes "odd" and
"even" to produce and . You
will need to specify the formatting for these new styles in one of the
cascading style sheets.
To specify a class as an addition to the underlying class, add a dot before the
class name. For example, .coins_yellow will be added to the standard classes
to produce and (the yellow background will be added to the standard "odd" or
"even" class).
This can contain {} to change the class programmatically.
Label Class
Text that is appended to the standard label class for this field.
Build
An RSP and name of a method to call to determine whether this field is
shown on the form.
If the return value is FALSE then the field is ignored and will not be present in
the form. This is intended for use with parameters.
31-May-2017 Construction Industry Solutions
Page 294 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Generate
Description
This allows you to include fields from other sources at this point in the page.
It can be either:
l
A form from another page, in which case all the fields from that form will
be included. Specify page.form; for example, %WPLIAIN001.UPDATE.
A program and method to programmatically generate the fields. For
example, glfgjh01.generateTokens.
JavaScript functions to call when the user leaves this field (whether or not
l
OnBlur
the value changes).
The functions need to be available to the page; for example, you can specify
.js files in the Script field of the page header.
onChange
JavaScript functions to call when the user changes the value of this field.
These functions are also run when the page first loads.
The functions need to be available to the page; for example, you can specify
.js files in the Script field of the page header.
This option is mutually exclusive with the validate field option and will be
ignored in this case.
onOK
The name of a JavaScript function to run when the field is validated. For
example, when you enter a contract number the contract name is displayed
alongside. Multiple scripts can be executed by separating with ";".
Two useful JavaScript functions to call are:
l
setReturnInput(,); input fields
l
setReturnField(,); display only fields
The source of the data is the return variable in the validation procedure. If
source is not specified then the target name is used for the source.
Calculation
Calculation to display
Sort
The field that is used as the sort index when records are sorted by this
column. Normally, this will be the name of the field itself, followed by +. If
this is blank, the field is not sortable.
Ignore Sort Limit
Select if the browse sort limit should be ignored for this column sort. You
should only select this if there is an index to support this sort order for very
large record sets.
31-May-2017 Construction Industry Solutions
Page 295 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Filter
Description
Whether to include this field on the browse filter automatically if the field is
shown on the browse.
This is particularly useful where column sets are in use - if the field is shown
on the browse, it is added to the simple filter drop-down list; if the field is
not shown, it is not included in the list.
Validate
How to validate this field. This can be either:
l
An RSP name; this will run the ValidateField method from this RSP.
Errors
An RVP name and the checks to apply. For example, jcvjob.!2,* will run
the standard checks in jcvjob.p, except check 2.
Which error messages are associated with this field
Populate
Enter the RSP, or RSP and procedure, to be used to populate this field.
Add Blank
When ticked, (if this field is a combo) Add a blank option to the list.
l
Populate methods (or syu008.i)return valid records, and you select whether
a blank is also required.
Blank Label
If Add Blank is ticked, this is the label to use for the blank option (for
example, "All"; the default is "None").
Combo Limit
The maximum number of values to be shown in a combo. If this number is
exceeded then the combo will be replaced by a fill in.
Populate Script
Script to run instead of the populate method to populate the data (for
example, to copy options from a similar object on the page).
Total
If you want this field to be totalled (on a browse), tick the box. You also need
to create a Total form for the page.
Spell Check
Whether spell check should be applied to this field.
Applicable to character fill in fields only. Simple editor fields have spell check
enabled by default.
Special
Program used to produce HTML for the field (if using View As = Special)
Column
A column number. Fields with the same number will be put in the same
column.
This allows you to format simple pages. However, using Append and
Column Spans is a better way to lay out columns.
Link Icon
Specify what link icon is to be shown alongside the link (if used).
ID
An ID for the field.
31-May-2017 Construction Industry Solutions
Page 296 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
This is used in two ways:
l
l
Token
For blank fields (that is, labels only), to specify the name of the field that
is used to display help for the label. This is useful for column labels.
For input fields where a program (such as a CUI report) requires a specific
fieldname to be passed back, but it is better to use a different actual field
name to allow for lookups and help. For example, the report expects rs_
dates__1, but you are using the field RS_glp_fdate__1; put rs_dates__1
in the ID.
This can also take a second entry (comma-separated) which is the name
of a field that is used to display help. This is used to override the help for
some fields on standard pages.
The token ID of the field so that it can be selected in a column set.
If blank then the field name is used. If ! then the field will be excluded from a
column set.
Token Build
A condition method which if returns true will build the token ID to allow
column sets to use this field.
Max Length
The maximum length allowed for input to this field. Maximum Length: 3
characters
Allow Link on Lookups Links are normally disabled during lookups. If you select this option then
the link will remain active if this page is used in a lookup.
Chart X
Whether this field is used as the X axis on charts. If you select multiple X
axes, then the values will be concatenated.
Chart Y
Whether this field used as a Y series on charts. You can select multiple Y
series and show on a multi-series chart.
Dual Y Axis
Whether this value should be plotted on the second Y axis on the chart.
Gauge Formatting
Extra formatting which will be applied if this field is viewed as a gauge.
31-May-2017 Construction Industry Solutions
Page 297 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.6.1 Page Fields - View As Options
blank
Allows you to display the field as an input field.
Blank When Zero
Allows you to display the value of a numeric field, and display a blank when the value is zero.
Checkbox
Allows you to display a logical field as a checkbox.
Code with tooltip
Allows you to display the code value as normal but will provide a tooltip when you hover
over the code showing the description. This uses the combo populate technology, so you
must have a getValue available in the appropriate RSP. This may not work very well
with updates or with linked fields but might be useful at other times.
Combo
Provides a drop-down from which you can select the value of the field.
To specify how the combo is populated, in the Populate field is an RSP name and optionally
the name of the populate procedure to call. e.g. job-rsp or job-rsp.job_complete.
You can populate a combo with a user defined list of options. The syntax for the populate is
as follows:sys002.combo^A,Desc A,B,Desc B,C, Desc C
As a default the combo will display in alphabetical order. To override this behaviour you can
specify the order by inserting Pipe symbol prior to the Description. For example:sys002.combo^C,|Desc C,A,|Desc A,B,|DescB
If the field is a user-defined code, show the value and description. If the field is a systemgenerated code, show the description only.
Variants:
l
Combo
l
Combo Description/Value
31-May-2017 Construction Industry Solutions
Page 298 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
l
Combo Value Only
l
Combo Value/Description
You can populate Combo-boxes using client-side code.
For example, on the Facilities Management - Add Job screen (page %WFM1010BSWJ),
changing the Major Category will change the possible selections of Minor Category and
Response.
There is a JavaScript file populateCombo.js which contains functions for populating
description/value and value only combo boxes. Various data is sent to the page using a couple
of Send Data procedures. This data is then manipulated by the function majcat_onchange in
FMstuff.js which calls populateCombo.
If you have too many records in a combo then the combo as an input device becomes
unusable. Also if you have lots of records then eventually you will break the string limit in
PROGRESS and the input field will fail. One workaround to this is to put two fields, one as an
input without combo and a display field with combo. There is now a count limit to all combos
such that if the count of options in a combo exceeds 400 then the combo is now shown and
instead a fill in will be shown instead. There is now an added option on the section field to
allow you to specify the limit to be shown in the combo. The Combo Limit field in under the
Populate field. If this is not specified it will default of 400 will be used.
Disabled Field
Allows you to display a field that is always disabled, but that you can put values into using
JavaScript. For example, a total field on a form that is the sum of some other fields.
Disabled with Lookup
Allows you to display a field as a disabled field and provide a lookup button alongside to
populate it.
This is equivalent to a server-side combo.
For example, people fields on a HS visitor record.
It could also be used to select a company for a PO although this is currently done with an
enabled field and field validation.
31-May-2017 Construction Industry Solutions
Page 299 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
You will need to set up a lookup for the field in the normal way and return an appropriate
description. Also using the lookup you can return an additional code in to other fields on the
page (hidden or otherwise); for example, the internal reference of the field.
Editor
Allows you to display the field as an editor box. The box has vertical scroll-bars if required.
Avoid displaying Editor contents in a browse (Body form). Use a Body Update or Update
form.
Email
This is similar to View As Link except that it automatically adds on the mailto: to the link so
that it links to your default email client.
File
Allows you to update a field as a filename.
In Update, the field has a Browse button next to it, which opens a Windows “Choose file”
dialogue box. The file you select is uploaded to the server and placed in the upload directory
for further processing.
Grid Element
A grid element is a cell in a matrix.
Inline Frame
An inline frame is a separate window and can contain a browse page which can using paging
techniques to navigate a large number of records.
In the Function field, specify the function that is to be included at that point in the header
page. Functions/Pages of this type should be named like a normal browse type e.g.
31-May-2017 Construction Industry Solutions
Page 300 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
%WmmBttt. If you specify a label then the frame will be labelled. If you don't then the frame
will take up the complete width of the header.
Link
Allows you to display a field as a Link.
This assumes the field contains a valid URL or Filename that can be linked to.
In Update the field is presented as a fill in for entry.
In display the field becomes a link to the document specified.
You can specify the link text to be different to the link itself. For example, if you have a link
to a document F:\documents\file.doc, that would by default appear as the text for the link. If
you enter something in the Populate: field for this field, then that is used instead. You can
also use {} to replace with data in the Populate: field.
List Frame
(Used on a Header form) A list is a non-paged set of records. You can control the size of the
containing frame by specifying a height on the field –this can result in a scrollbar being added
(if you leave the height blank, the list grows to display all records). However, all the records
are downloaded in to the header page (beware the volume of data). In the Function field,
specify the function that is to be included at that point in the header page. Pages of this type
should be named %WmmLttt where mm is the module, L (for List) and ttt is the table TLA. If
you specify a label then the list will be labelled. If you don't then the list will take up the
complete width of the header.
Multiple Selection
You can view comma-separated lists as multiple check boxes.
e.g. cim_typelist on ci_company is a list of company types.
You setup populate/getvalue functions in the RSP exactly the same as a combo. The result is
a set of checkboxes, one for each of the options in your populate function, ticked if the field
you are updating contains the code in its list.
31-May-2017 Construction Industry Solutions
Page 301 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The display version shows only the ticked options.
Variants:
l
Multi-Select
l
Multi-Select Value/Description
l
Multi-Select (2 Columns) - displays as two columns of checkboxes.
l
Multi-Select Value/Description (2 Columns)
No Break
No Break will ensure that the field is not broken up when the available space is too small.
This is done automatically for integers and decimals but you can use this view as option for
other fields if required. Particularly useful for codes that might contain hyphens.
Ordered List
Allows you to update ordered list fields with two separate lists with add, delete, move up and
move down buttons.
31-May-2017 Construction Industry Solutions
Page 302 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Set view-as on the field to Ordered List (or one of the value and description options). You
will need a populate method (same as for combos, selections, etc.) and you will be presented
with a list of unused codes in a left selection list, and the selected codes show in a right
selection list.
The display version shows a comma-separated list of the selected codes.
Look at %WSYBSUR (User Maintenance - Groups Tab) for an example.
Variants:
l
Ordered List
l
Ordered List Description/Value
l
Ordered List Value Only
l
Ordered List Value/Description
Password
Allows you to update and view a field as "password".
This will display *** in the place of the actual field.
Picture
View-as picture will present an image on screen when in display/read only mode and a fill in
field (for the file/URL reference) when in update mode.
See the picture on the HR Person record for an example.
31-May-2017 Construction Industry Solutions
Page 303 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Preformatted
Allows you to display a field as preformatted.
This will add around the HTML for this field. It assumes the data will be
formatted in fixed width columns.
Select Preformatted on the view as field on the page field maintenance.
This view of data is provided to allow some existing code to be used in a web page. You
should not use this type of View As except in this circumstance.
Radio Set
Allows you to display input fields as radio sets.
Set it up like a combo (that is, with a populate option) and change the view as option to radio
set. You will get a vertical radio set. Display will be the same as a combo i.e. the description
of the selected option will be shown.
Selection
Allows you to display data in a multi-selection list.
These are equivalent to the combo selections except that they accept multi selections and
return a comma-separated list as a result.
The use of these is not recommended for updating records as it is too easy to click on the list
and delete the data that is already selected. For this you should use multi select checkboxes.
These can be used for forms, for example report selection or processing selection where the
initial value is probably blank.
You need to specify a populate method in the same way as you do for combos.
Variants:
31-May-2017 Construction Industry Solutions
Page 304 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
l
Selection
l
Selection Description/Value
l
Selection Value Only
l
Selection Value/Description
Sorting Combos, Selection List, Multi Selects and Ordered Lists
These are sorted automatically in to the order that is selected in the view as.
For example, if you select view as combo value/description then the sort will be on the
value.
If you select view as combo then the sort will be on the description.
If you want to override this (for example, GL Periods are sorted in date order not description
order), then specify | as the first character of the description field. This can be specified in
the syu008.i entry as &fixOrder=|.
31-May-2017 Construction Industry Solutions
Page 305 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.7 Named Filters
Named Filters provide a drop-down selector that allows the user to select records that match
a pre-defined query (for example: all, posted or unposted batches). Usually Named filters
extend the Body Query specified on the page decreasing the number of output records.
7.7.7.1 Replacing body query
Also you can specify a named filter that replaces the Body Query on the page rather than
adding to it (it is possible to change body table as well). If the query you set on the Named
Filter begins "FOR " then it will replace entirely the query specified in the query on the page
section. This can allow you to use different tables in your query. Example where this came
up was a list of suppliers where the normal query on the page section was:
FOR EACH ap_vendor WHERE ap_vendor.kco = {kco}
We can then add a named filter with a query avm_sclab = YES to give a filter on those that
supply SC labour and another with a query
FOR EACH ap_vendor WHERE ap_vendor.kco = {kco}, FIRST ap_invoice OF ap_vendor
WHERE ap_invoice.ain_entry = 1
which will give all suppliers where they have an invoice that is costed to a contract.
7.7.7.2 Linked Named Filters
You can link named filters. If you have standard filters that need to be applied to a number of
different but similar pages you can now link (as well as the forms which has been available
for some time) the named filters. There are two fields on the page section maintenance to
allow you to specify the page section to use to retrieve the named filters. If you leave them
blank then it will use the filters defined on the current page section.
7.7.7.3 Multiple Named Filters
It is possible to have multiple named filters that are applied to the query together. If you
select the New field on the named filter then this will start a new named filter combo from
that named filter onwards. The query condition on the first (existing) set of filters can start
with a replacement for the main body query FOR EACH. Subsequent named filters can only
append addtional query conditions to this. In this way you can build a matrix of filters that
can be applied separately or together rather than having a large list of all combinations in the
single combo as we had to previously do.
31-May-2017 Construction Industry Solutions
Page 306 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.7.4 Named Filter Query Conditions
You can now override the query condition function on the body query on a named filter.
There is a new field Query Condition on the named filter. If this is non blank then it will be
used in preference to the one specified in stn_qcondition on the page section. If you are
using multiple named filter combos then the query condition can only be applied to filters in
the first combo which are the root query to be used (same as overriding the FOR EACH in
the query)
7.7.7.5 Using Named Filters to define what fields are built on a form
You can now use Named Filters in conjunction with Build Conditions to determine what
fields are built on a form.
Parameters:
Mandatory:
Name
The name of your filter how it'd appear in the combo-box ("All" to show all
entries)
Optional
Table
Build
Query
String
The name(code) of the table for the query
RSP-function to build field
appended to your query
,
31-May-2017 Construction Industry Solutions
Page 307 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.7.8 Browse Filters
Browse filters allow the user to determine additional conditions to query to show a smaller
number of records. Browse filter is shown as the "Advanced filter" at the bottom of Browse.
You can now specify a data type and format on advanced filter fields. If specified then
standard input data type formatting will take place.
For example :- dates will be expanded, decimal points, commas added etc.
If you leave the data type blank then no formatting will take place as before.
7.7.8.1 Parameters:
Mandatory:
Field
The field code for your query
Label
The name of your filter how it'd appear in the page
Type
Specify the conditions to execute the query (e.g. LE, GE, MA, etc.)
Optional
View as
Populate
Type of the field (e.g. Combo, Checkbox , etc.)
Build
RSP-function to build field
Query
Lookup Field
Data Type
Format
String, appended to your query
lookupCode(?)
Type of output
Specify rsp, containing populate for Combo and MultiSelect fields
Format of output
31-May-2017 Construction Industry Solutions
Page 308 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.8 Report Designer
7.8.1 Key Features
l
Copy and amend standard reports
l
Build simple and complex reports
l
Use simple and complex calculations
l
Use conditional formatting
l
Use graphs, graphical displays, KPI reporting and trending
l
Display/update user defined data including report stores
l
Use of Alerts to send Tasks or Emails
l
Create automated report packs and distribution
l
Create Data Marts
l
Integrate with all generic reporting features
l
Integrate with Workflow
l
Log Files
The Report Designer can be used to maintain complex reports, inline reports, report packs
and container reports.
31-May-2017 Construction Industry Solutions
Page 309 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.8.2 Page Summary
Create a Page to be associated with the function. This is not the layout of the report but the
web page to be displayed when running the report - that is, the selection criteria (the page
will include 'Output Options' by default in addition to any other selection criteria defined).
As with browse, create the Page, using the same code as the calling Function. However, with
reports there are additional fields which are populated to provide functionality (typically
predefined Report Selection criteria).
In the Header section of the Page, define a FSP (Form Service Procedure) for the Body Table
to be reported on; this will provide certain tools and functionality to the report such as
standard selection criteria. 7.6, Forms Service Procedures and Report Selection Generates
There are no other Body details required on the webpage as this is just the selection page for
the report (the actual detail; fields, columns etc. are maintained in the Report Section).
Click Save to save the Page and move on to Forms and Filters.
Although the Page is to be associated with a report it is necessary to create an Update Form
in the Page to allow the user running the report to enter their appropriate selection criteria.
Once the Update Form has been created, then add the fields. If standard selection pages are
to be used (see FSP's above) add a blank field to the page and ensure that the GENERATE
field points to the correct selectionGenerate in the Form Service Procedure.
Fields defined for pages for report selection need to be flagged as Add and Update and must
be associated with an 'Update' Form to allow entry of selection criteria.
Each field can be assigned a Tab - the selection will appear on that Tab (The Tab must exist
as a function, by standard convention the table is named funcT where func is the
function/page/report code and T designates tab. See additional information on naming
conventions).
Although Named Filters and Browse Filters appear as available in Reports there are only
used in COINS OA for Page Design
.
31-May-2017 Construction Industry Solutions
Page 310 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.8.3 Report Designer_Using RS Fields
In addition to the standard Selection Generates available in the FSP?s it is also possible to
pass other selection criteria to a report, either to the report query or to any parameter
driven (RO_) fields used on the Report.
The RS_ Fields are specified on the ?Update? Field portion of the Page Section for the report.
To create a Report Selection field add the RS_ prefix and selection type suffixes (?FROM? = _
_1 , ?TO? = __2 and ?MATCHES? = __3) to the field required for selection.
Example:
To filter for ?Matches? on the ?job_group? use the following:
RS_jgr_group__3
Filtering the same field on a ?FROM ? TO? basis use:
RS_jgr_group__1 and RS_jgr_group__2
Reference these RS_fields on the selection criteria of the report query, when doing this the
program will replace the {RS_ fields} portion of the query with the actual values the user
entered at runtime.
31-May-2017 Construction Industry Solutions
Page 311 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.8.4 Report Designer_Report Forms
Below are the Report sections available for use.
The Form sections should be added as required, as a minimum a Body section should be
created.
Fields are then assigned to the Body as required. The fields can be extracted from the
Database Enquiry depending on the query using the same principles as when setting up
Pages for browsing and enquiries.
31-May-2017 Construction Industry Solutions
Page 312 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.8.5 Headers and Footers
Multiple Headers and Footers are associated with the Sort options assigned to the Report
Section. If Sort options have been set, simply click the Total box in Report Field Maintenance
and COINS OA will define the appropriate subtotals and totals in relation to the sort options
defined.
As long as header and footer forms have been defined for the report, to correspond to the
sort levels, COINS will populate these automatically with the fields the report is sorting by.
However, it is necessary to specify labels and descriptions for these fields.
To provide column totals, add a "Total Columns" form (for report run totals) or a "Footer
Columns" form (for subtotals); again, no fields are required on the form; on the field records
for the fields to be totalled, tick the Total box.
The contents of the header and footer forms can be overridden by adding fields manually.
31-May-2017 Construction Industry Solutions
Page 313 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.8.6 Default Report Labels
Default report labels are used to populate the automagic behaviour behind the Header X
Forms and Footer X Columns. They provide the Label Name and the Field List which appear
in the standard Headers and Footers which appear on Reports by Sort Levels. It is important
to remember that changes to this table will affect ALL reports and not just a single report.
If you would like to override this automagic behaviour on any report you can always add the
fields as required to the relevant form on the bespoke report. (i.e. as soon as you add fields
to a Header Form or Footer Columns you override the automagic behaviour). This is not
always desireable as this means that you would have to keep your accumulated totals
manually to display in the footer columns - It is probably more desireable to maintain the use
of the Footer Columns and to also make use of the addtional forms available at all levels do
any additional calculations or display further information.
For example for every Footer X Column there is an equivalent Footer X Form which will
appear directly beneath this form.
Footer Forms will automatically display information details one underneath the other so it is
often necessary to append records to appear across the page.
31-May-2017 Construction Industry Solutions
Page 314 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.9 Data Display Colour Ranges
Configuring Colour Ranges for use within COINS OA Reporting simply enter the code for the
Range and then enter a comma separated list containing the ranges and classes for this code.
Data Display Colour Ranges are Company Specific and must be configured in every company
in which a report may be used.
To set up the colours and ranges that COINS uses to display gauges and to highlight 'score'
fields such as performance ratings :
Code
The code for the data display type.
For gauges, this code must be entered as the value of the Populate field for the
field to be displayed.
For 'score' fields, this code must be passed as the first parameter to the {co_
config.RO_rangeClass} method in the Class field (the score field/score value
being compared should be the second parameter).
Description The ranges and colours for this code.
These are of the form number,colour,[number,colour,] ... number, where number
represents the value at which the colour display changes, and colour represents
the colour used for displaying values between the two numbers on either side of
it.
For gauges, colour is a hexadecimal RGB colour code. For example,
0,#00FF00,3,#FFFF00,7,#FF0000,10 gives the range 0 1 2 3 4 5 6 7 8 9 10.
For 'score' fields, colour is a cascading style sheet class defined in the user.css
file.
31-May-2017 Construction Industry Solutions
Page 315 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.10 Alternate Line Shading on Forms and Reports
This guide provides instructions for COINS Business Intelligence and Reporting designers on
how to shade alternate lines of PDF reports and forms.
It is expected that the user performing the tasks outline in this How-To guide has completed
COINS Business Intelligence and Reporting training.
Alternate line shading allows the report reader to associate right most totalling or display
columns with the detail on the left of the page as shown below:
Always perform all implementation and testing of report and/or form alterations in an up to
date, non-live environment before attempting to migrate your changes into the LIVE
environment.
When migrating your changes to the LIVE environment it is recommended that you have a
working, complete backup of the LIVE environment.
31-May-2017 Construction Industry Solutions
Page 316 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.10.1Prerequisites
The user performing the tasks in this “How-To” must have:
l
COINS Business Intelligence and Reporting training
l
A COINS designer license allocated to their COINS user account
31-May-2017 Construction Industry Solutions
Page 317 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.10.2Task Summary
The tasks required to implement alternate line shading in COINS reports and forms are as
follows:
Create report field styles
Applying to forms (optional)
Applying to reports (optional)
The tasks are to be performed in the order outlined above. Each task is broken down into a
series of steps that will need to be completed.
Some tasks are identified as optional. Whether or not a task is optional will depend on your
specific COINS installation.
Please contact COINS support if you require any clarification of tasks contained within this
“How-To” guide.
31-May-2017 Construction Industry Solutions
Page 318 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.10.3Create report field styles
The first task is to create a set of report field styles that allow reports and forms to invoke
the field shading. The number of field styles that will be required will depend on the COINS
installation and the number of existing field styles being used.
Field styling is not cumulative and as such a unique field style will need to be created for
each existing field style where an alternating background colour is required.
The following steps will be performed via the COINS OA web interface.
Log into the COINS OA web interface and navigate to OA Reporting & BI → OA
Reporting & BI Setups → Report Field Styles as shown below:
1. Add a new report field style that references a variable, which will hold the
required line shading colour:
31-May-2017 Construction Industry Solutions
Page 319 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The Style field must be a unique alphanumeric;
The Formatting field must contain the name of a variable that will be created in
the report or form later in the How-To guide. In the above example, the variable
is named: lineBackgroundColour
2. Add all further new report field styles where the alternate line shading will be
required. Multiple formatting options can be applied by separating each formatting
option with a comma (,) character. For example, where the existing “Red Negative”
report field style is used where line shading will be required, then create a new
report field style for the combination of the “red Negative” style and the alternate
shading style:
Once all required report field styles has been created, then proceed to the next task.
31-May-2017 Construction Industry Solutions
Page 320 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.10.4Applying to forms
Applying alternate line shading to forms is a little different to how it is applied to reports.
Forms do not have defined sections as reports do. Instead “forms” can be defined on the fly
and “forms” do not have any properties of their own.
The following steps will be completed using the COINS OA web interface.
1. Log into your coins environment using the COINS OA web interface. Navigate to
the OA Reporting & BI → Document Designer → Document Designer menu
option and drill into the form that you want to modify. Go to the Document tab as
shown below:
Note the names of the Header Form and the Body Form
2. We need to initialise the variable that has been defined in the alternate line
shading report field styles, created in Create report field styles. To do this go to
the Fields tab and open the first field that is part of the named Header Form and
add the calculation as shown below:
31-May-2017 Construction Industry Solutions
Page 321 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
This will initiaise the lineBackgroundColour variable to white and the first line of
detail will be shaded. If your preference is to have the first line unshaded, then set
the lineBackgroundColour variable to an empty string:
Save your changes.
3. Identify the first field that is associated with the named Body Form and insert a
new field on the same Row number but with a lower Column number so that is is
ordered before all other Body Form fields, but does not create an additional row
in the Body Form. You may need to reorder the existing Body Form fields to be
able to insert this new field. The new field should be defined as follows:
31-May-2017 Construction Industry Solutions
Page 322 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Note the zero width field and the calculation:
Each line of the Body Form will alternate between #FFF (HTML colour code for
white) and #F7F7F7 (HTML colour code for an off-white shade). These colour
codes can be tailored to your specific requirements.
Note that some COINS forms, for example Purchase Orders, contain additional forms that
may appear in the place of the named Body Form. In these instances, step 3 will need to be
repeated for each of these forms if they are to also be alternately shaded.
4. Now visit all other fields associated with the named Body Form and set the Style
field to the appropriate report field style:
31-May-2017 Construction Industry Solutions
Page 323 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Once all fields of the named Body Form have been modified to use the created report field
style, test the changes to ensure that the form lines are shading as expected.
31-May-2017 Construction Industry Solutions
Page 324 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.10.5Applying to reports
To apply alternate line shading to COINS reports, we will use the calculation fields on the
report forms rather than in “hidden” fields, as was necessary in forms.
The following steps will be completed using the COINS OA web interface.
1. Log into your coins environment using the COINS OA web interface. Navigate to
the OA Reporting & BI → Designer → Report Designer menu option and drill into
the report that you want to modify. Go to the Forms tab as shown below:
2. Identify the inner most Header Form. We will use this form to initialise the line
shading variable defined in Create report field styles. In this example we have
defined the variable: lineBackgroundColour. Open the inner most header form
and add the calculation as shown:
31-May-2017 Construction Industry Solutions
Page 325 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
This will initiaise the lineBackgroundColour variable to white and the first line of
detail will be shaded. If your preference is to have the first line unshaded, then set
the lineBackgroundColour variable to an empty string:
Save your changes.
3. Open the BODY form and add the calculation to alternate the line shading as
shown below:
31-May-2017 Construction Industry Solutions
Page 326 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Each line of the Body Form will alternate between #FFF (HTML colour code for
white) and #F7F7F7 (HTML colour code for an off-white shade). These colour
codes can be tailored to your specific requirements.
4. Go to the Fields tab and visit all fields associated with the BODY Form and set the
Style field to the appropriate report field style:
31-May-2017 Construction Industry Solutions
Page 327 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Once all fields of the BODY Form have been modified to use the created report
field style, test the changes to ensure that the report lines are shading as
expected.
31-May-2017 Construction Industry Solutions
Page 328 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.11 Queries on Purchase Orders
It is recommended that you use tip_type in any query to ensure that it is indexed properly,
the tip_type will either be MATERIAL (material, plant, asset, stock etc) or TRADE
(subcontract).
The key thing to remember when reporting or enquiring on orders or order lines is that each
time a variation is raised against an order a new po_hdr record, with associated po_lines, is
created. This means you could end up with more than one line per order in your report or
browse.
There are reporting fields (RO_) available to assist with this and below is a standard query to
get the latest order information (i.e. the latest committed variation).
FOR EACH po_hdr WHERE po_hdr.kco = {kco}
AND po_hdr.tip_type = "MATERIAL"
AND po_hdr.poh_mpo = "M"
AND po_hdr.poh_chgno = ""
{pohSelect},
7.11.1po_line v po_item
As noted, a po_line record will be created for every line entered onto an order; commodity,
text, clauses and will be created for every variation. However the actual detail of the lines
are stored once each (only when the order or variation is committed) in the po_item table.
This table will not contain text lines or clauses - only items with a value. There are extensive
fields (both database and RO) on this table for reporting ordered, delivered, invoiced values
and quantities.
To link to po_item from po_hdr (and then back to the latest po_line if required) append the
following query to that above.
EACH po_item
WHERE po_item.kco = po_hdr.kco
AND po_item.tip_type = po_hdr.tip_type
AND po_item.poh_ordno = po_hdr.poh_ordno,
LAST po_line of po_item OUTER-JOIN
31-May-2017 Construction Industry Solutions
Page 329 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Another View of this query...
As the selection page will only work on the Original Order it may be the case that the above
query is not what you are after. (ie the Selection on Order Date only refers to the Original
Order). If this in not what is required then the following query may help. It will look at all
orders which are committed and then look at all order lines which have a commodity code
assigned and the query condition will remove the duplicate information and will report on
the latest information on the order line.
Query FOR EACH po_hdr WHERE po_hdr.kco = {kco}
AND po_hdr.tip_type = material
AND po_hdr.poh_mpo = M
AND po_hdr.poh_committed = TRUE
{pohSelect},
EACH po_line of po_hdr WHERE po_line.pol_type = 'C'
Query Condition: RemoveVariedOrders
31-May-2017 Construction Industry Solutions
Page 330 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.12 Calculations Overview
This section provides an overview of the calculation syntax used within the OA Toolset and
provides some examples of its use.
Calculations can take place on any Database field and/or include any conditions required to
produce a desired result. This section basically splits calculations down into three major
areas.
l
Calculations on Numerical Values
l
Calculations on Character Values
l
Calculations on Date Values
There are various areas in the BI toolset where calculations are utilised and the syntax used
is consistent across all of these. Some of the areas where calculations can be used are as
follows:Report Writer
l
Field Definition
Report Designer
l
Field Definition
l
Initial Calculation
l
Pre Report Calculation
l
Post report Calculation
l
Calculate Condition
Page Designer
l
Field Definition
l
Initial Calculation
DataSets
31-May-2017 Construction Industry Solutions
Page 331 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
l
Field Definition
l
Initial Calculation
l
Pre Report Calculation
l
Post report Calculation
DataMarts
l
Column Definition
Workflow
l
Initialisation
l
Stages
31-May-2017 Construction Industry Solutions
Page 332 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.12.1Mathmatical Functions
+-/ *
^
fact(n)
pi
Valid Operands are add, subtract, divide and multiply
Exponent (a to the power of b)
Returns factorial n (that is, n*(n-1)*(n-2)…)
Returns the value of pi (π)
jc_job.RO_ContractCosts^TD – jc_job.RO_ContractCosts^TP;
It is necessary to ALWAYS surround any mathematical sign with spaces. An operand without
spaces will cause an error. To remember this think of the minus sign which without spaces
will be treated as a hyphenated word.
31-May-2017 Construction Industry Solutions
Page 333 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.12.2Calculation Field Rules
It is possible to include multiple calculations within the one calculation box - Each calculation
is separated by a ; symbol (semi-colon). It is always the last calculation in the box which will
appear on the report if the field is a calculated field.
If there is a 'Field' defined on the field record then it will be the 'Field' which is displayed
although the calculations will execute.
Calculations can only be performed on data of the correct type, i.e. The Test in an IF
statement can only be performed on an integer or decimal value.
Typical error messages which may be reported in the Log File are :
"Primary expected but found string".
"Invalid Character in Numeric Input …"
The $ sign at the front of a variable within the calculation box will indicate that the result of
the calculation is a character value.
var- A simple variable will expect a numerical value.
$var - defines the variable var as a string – it will therefore expect character format data and
should be in quotes.
31-May-2017 Construction Industry Solutions
Page 334 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.12.3Variables
Values can be assigned to variables so that they can be used in a later calculation.
To assign a value to a variable use the format:
Variablename=
jToDat =‘01/01/11’;
dProfit=dRevenue – dCosts;
'this' is a reserved word which will enable you to assign the current field value to a variable.
dValue=this;
DO use standard naming conventions, examples used by the BI Team and COINS Developers
are :
jDate - A prefix dates with j
iCount - prefix integers with i
dCosts - prefix decimal values with d
cText - prefix text/character values with c
lComp - prefix logical values with l
Using a convention like this should also prevent you hitting on the major Don'ts (using
dictionary words as variable names).
DO always qualify fields when using them in the calculation fields within DataSets and
Calculate Conditions. Eg. jc_job.RO_ContractCosts^TD
DON'T prefix any variable name with a numeral - it will fail.
DON'T use dictionary words as variable names, they may be commands in COINS or
31-May-2017 Construction Industry Solutions
Page 335 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
PROGRESS, examples that will fail include Group, Type, Index, Count, Total - if you use
prefixes as noted in the DOs above - you can use cGroup.
31-May-2017 Construction Industry Solutions
Page 336 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.12.4Debug
By turning debug mode on, all calculations will be verbose in the log file.
The log file is the last icon on the report status workbench The basic layout of the log file shows:
> The variables currently being sent to the report from the Page (via Form Service
Procedure
> The Record Service Procedures being used within the report
> If a DataSet is being used in the report the Temp Table will be defined and then the Query
for the dataset.
> The value of any replacements being made within the Report Query (Eg {kco} - You will
see REPLACE: kco 1)
> The Query used on the report and the value at the start of the query is the number of
seconds the Query takes to run.
> Report Selection - Indicates that the Report has completed.
> FOP - Which is the PDF generate program does display some Warnings and Errors - Please
follow the link for some common errors which cause the PDF to Fail
To turn debug on include debug(1);
This can be included in the initial calculation field and will be available to all calculations
within a report unless debug(0) is entered to turn it off. Although putting a report LIVE with
debug turned on will not cause an error there should be a process put in place to ensure that
debug has been removed before a report is put 'LIVE' as debug can make log files
unnecessarily large and can use disk space.
Example:
31-May-2017 Construction Industry Solutions
Page 337 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Results:
If only a specific calculation needs to be debugged, rather than display all calcs in the log it is
possible to selectively switch debug on and off. Simply add debug(1) in front of a calculation
in the calculation box of a page or report field and debug(0) after it
debug(1);$SectOrd_code=Substring$(co_extra.cex_cha__7,1,10);debug(0);
31-May-2017 Construction Industry Solutions
Page 338 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.12.5Curly Braces
The functionality of {}'s is to specify a place holder in fields and calculations into which a
value can be passed.. When using {}'s around a field the use of quotes is required if the field
is a character field. The use of double or single quotes is acceptable.
The only thing to be aware of is that when using '{field}' replacement on a character field is
that if the information within the field could contain an apostrophe (for example- J O'Connor)
then the apostrophe would cause close to the single quote and you will get a symbol not
found(Connor) Error. To overcome this error the use of double quotes "{field}" is the answer.
The use of {}'s in calculations is possible on all field values except within the DataSets and
the calculate conditions on a report. In these instances it is necessary to always qualify out
the field with the table name.
{RO_ContractCosts^TD|0|{RS_glp_fdate__2}}
would be written as:
jc_job.RO_ContractCosts^TD|0|{RS_glp_fdate__2}.
The use of the table name is allowed in all calculations but whereas in most instances the
formatting of the result is suppressed, within the calculate condition it is not and therefore
the comma in a result of a figure in excess of 1,000 may result in an error in syntax in a
calculation. (NB. Please note that the replacement on parameters of an RO field is still
acceptable).
Within the OA reporter/screens we use curly braces {} as a method to pass values to a query
or a report or a page. Enclosed within the curly braces you specify the commands, RS_fields,
or other data you need to communicate across or within objects. {kco} is a common usage,
and is used to place the current logged in company number into the query.
The next example gets information from jc_job and inherits the Company Number from the
system, retrieving the company number the user is logged into.
FOR EACH jc_job WHERE jc_job.kco = {kco}
31-May-2017 Construction Industry Solutions
Page 339 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13 Datasets - Overview
A Data Set is a pre-defined Table which is created at the time of the query. Once the table is
created then it can be accessed via either Report Writer or Report Designer. The benefits of
using Data Sets are:
o
Provide access to PROGRESS temporary table functionality
o
Build single table of data from various COINS tables
o
Build Data Sets for use in multiple reports
o
Allow sorting by virtual fields
o
Allow filtering by virtual fields
o
Allow union of several Data Sets ( Useful for Cross Modular Reporting)
o
Summarisation of data
o
Simplification of data views for users
31-May-2017 Construction Industry Solutions
Page 340 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.1Creating a Data Set
Once the fields which are required have been identified the query to obtain those fields
must be created. In this example the fields required have been identified as
• Contract Number –(job_num)
• Contract Name – (job_name)
• Contract Cost – (RO_ContractCosts^TD)
• Contract Revenue – (RO_ContractRevenue^TD)
• Contract Profit (RO_ContractRevenue^TD – RO_ContractCosts^TD)
To create a new Data Set go to the Data Set Definition option under the Designer Menu.
Click
Select a Data Set Name and Description for the Data Set in this example is has been named
'NLWJC_PROF' with a description of ‘Standard JC Profit/Loss DataMart'.
A Query must be assigned to the Data set, which in the following example is a simple query
of each Contract which takes advantage of a 'Contract Selection' made at run time.
FOR EACH jc_job WHERE jc_job.kco = {kco}{jobSelect}
Create an identifier for the Data Set Table Name. In this example it is 'contract'.
Once created, the table name is always prefixed with a ‘tt’ when used, so in this case the
table will be accessible in a report using a ‘FOR EACH ttcontract’ query.
Field
Description
Generate Program: It is now possible to call COINS standard generate programs and
include them into your Data Set. – Sample generates
scr399,plr399,slr399,csr399. (Open item records).
Raw DB Query
This will bypass the Business Logic and get data directly from the
Database so care should be taken on who is given access to Data Set
31-May-2017 Construction Industry Solutions
Page 341 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Queries where this selection is selected. (ie: This will ignore all security).
There are three calculation fields which can be applied to the data set.
Field
Initial calculation
Description
This will calculate prior to the query executing thus allowing the variable
to be used within the Query, e.g.
$sdate = date$(datestring(co_config.glp_fdate^-12|{RS_glp_fdate}));
Would allow a query to be created such as:
FOR EACH jc_job WHERE jc_job.job_condate >=’{eval.sdate}’
Pre calculation
Post calculation:
This will take place after the query but prior to the fields calculating
:This will take place prior to the data set closing
Variables used in a Dataset are NOT available in the report.
To move onto the Data Set fields, click
7.13.1.1Data Set Fields
When Adding fields to the table, you can give the field a Name that can either be same field
name as the field in the source table or you can name the field something that will help
Report Writer/Designer users identify the information in the field more easily. (Eg: location_
desc is assigned to the field jcl_desc)
Each field should be given:
Field
Label
Data Type
Default Format
Source
Description
This will become the name of the field when using the Data Set in
queries/Reports etc. You may either using teh same name as the
source field or assign a more user-friendly name. Spaces should not be
used
(eg Character, Date, Decimal, Integer, Logical)
(NB. All formats are only defaults and can be overridden in reporting)
The source can be any field (Database or RO) from the tables accessible
via the query or it could be a calculation.
As an example, the sample of the fields which have been added to the Data Set are seen in
the diagrams below.
31-May-2017 Construction Industry Solutions
Page 342 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 343 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.2Best Practice
l
Only create fields in a DataSet that are going to be used in the equivalent report.
l
It is better to ‘Source’ a field rather than to ‘Calculate’ a field for efficiency.
l
l
l
It is recommended that any calculations that can be carried out on the report/page
should be done at that stage.
For performance reasons, {}’s are now replaced once at the start of the dataset
(v10.22 onwards) so as to not replicate the process for every field in the dataset.
This is not a problem in most instances as the {}'s used in RO fields are usually
something along the lines of {RS_glp_fdate__2} which is consistent across all
records. It will mean however that you cannot put {}'s around field names; for
instance '{job_num}' is not possible because this replacement will differ on each
record. It is imperative that fields like this are referenced with
Tablename.Fieldname e.g. jc_job.job_num - It is always best practice to fully
qualify fields in a calculation on a dataset as the field will not strip out formatting
etc so the value 10,000 would cause a problem previously in an if statement as
the comma would be read into the if statement causing the syntax to have too
many parameters.
To maximise efficiency, any field on a DataSet which is not at the lowest level of
the DataSet query, should be taken out of the DataSet and initiated on the report.
For example if you had a query on the DataSet which reads
FOR EACH jc_job WHERE jc_job.kco = {kco},
EACH jc_costcode OF jc_job.
l
l
Then fields from jc_costcode should be included in the DataSet but any RO fields
etc from the jc_job table should be called on the report. To save unnecessary
replication of calculations.
It is good practice to Summarise at DataSet level, rather than at Report level if
Summarisation is required. This is so that multiple records are not created and
passed across to the report unnecessarily. This will reduce the load on the
network traffic, especially where report servers are in use, and will reduce the
amount of time the report takes to generate.
Debug(1); - Can be turned on to debug a dataset but should be removed when setting a
DataSet live. Debug(1) should be defined as a calculation in the Initial Calculation box. Once
debug is turned on then all calculated fields will be verbose in the Report Log File.
Data Sets can be exported from one environment to another by simply choosing the Export
Data Set Definitions option from the Designer menu.
31-May-2017 Construction Industry Solutions
Page 344 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Enter the Data Set Name or use the lookup facility to find the relevant Data Sets and click
Next
Once the Data Set has been exported to the Definition Data Window use the standard
windows select all(Ctrl-A) and copy(Ctrl-C) functions to copy the data from the Definition
Data Window and then Paste(Ctrl-V) to the Import Data Sets Definitions window also found
Menu below in the environment you are wanting to add the Data Set after which you should
then click the save icon.
A Data Set cannot pre-exist so if there is amendment required to a Data Set it must first be
removed prior to importing
31-May-2017 Construction Industry Solutions
Page 345 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.3Granting Access to Data Sets for Other Users.
Once the Data Set setup has been completed you can allow access to the relevant users by
creating a %DttContract Function via Function Maintenance.
Access to this function is then granted via the standard Function Security procedure.
The Data Set can be enabled to be accessed by Report Writer by the creation of a Report
Writer query accessing the ttContract table.
31-May-2017 Construction Industry Solutions
Page 346 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.4Rules for Keys
It is possible to summarise DataSets by adding a ‘KEY’. If the query is looking at all Contract
(jc_job) records but the requirement in the report is to be by Contract Location then a ‘KEY’
can be set at kco/jcl_loc (ie: Tick the Key box on both of these fields). In this instance only
one record will be created on a unique find of Company/Contract Location. Any numerical
fields are accumulated whilst character fields are assigned where there is common data
where records share the same ‘Key’ details. (If it finds character fields which differ then the
value of the field will be blank).
If there is a requirement to do a calculation once all of the records for the ‘Key’ are
accumulated then you can tick the ‘Recalculate Summary’. (Eg: An example of where this
might be required is when a percentage is required).
Note: Any field which is used as a key CANNOT have a value of blank.
31-May-2017 Construction Industry Solutions
Page 347 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.5Cross Modular Reporting
To achieve Cross Modular Reporting two independent Data Sets can be created using
different Source information but containing the following commonalities
l
Same Table Name
l
Same Field Names (in same order)
l
Fields must have the same DataType (ie. Char,Int,Dec,Logical,Date)
The datasets can then be both called on the report and the common table name will unionise
the data. An example of such an application might be a Purchase Ledger and SubContract
Ledger Open Invoice Dataset.
31-May-2017 Construction Industry Solutions
Page 348 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.6Using Data Sets in the Query Editor
The Query Editor allows fast access to information in the COINS Database via the Business
Logic. It also allows export to Microsoft Excel.
It is possible to reference a Data Set from the query editor. Simply referencing the data set
and running will return the complete contents of the Data Set - No query is required.
If the Dataset query takes a parameter replacement field (i.e. {RS_year}) then you can set the
parameters by adding them to the URL on the Query Editor Page. (i.e. &RS_year=2009)
NOTE : the full Data Set will be generated before any results are returned so be warned - a
large data set may be slow.
This has allowed the extract to Excel to be more flexible as limits in the information being
passed limited both the query length and number of fields that could be accessed through the
editor. Referencing a dataset code greatly enhances the ability to extract data this way.
31-May-2017 Construction Industry Solutions
Page 349 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.7Using the Data Set in Queries
The Data Set can now be used in Queries in Report Designer. Using our example dataset, the
body table should be ttContract, the body query should be - FOR EACH ttContract and the
Data Set Definition would be BIWJC_PROF.
Note that you can use more than one dataset in a query. To do this enter each dataset name
in the Data Set Definition field separated by a comma. You will need to reference each
ttTablename as appropriate in the body query.
It is possible to sort on any field from within the Data Set – In the example below we are
using a field which has been populated with the virtual field jcl_desc with is the Location
Description. This will put the contract in alphabetical order of the locations to which they
belong. (NB. It is always necessary to qualify the field name with the Data Set table name in
the sort)
31-May-2017 Construction Industry Solutions
Page 350 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Fields can then be added to the report in the standard way. It is always good practice to
qualify the field names also with the Data Set table name although it is not mandatory.
7.13.7.1In-Line Reports
For in-line reports, specify the dataset(s) to be used on the container report e.g.:
31-May-2017 Construction Industry Solutions
Page 351 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Then for each inline report, only use the ttTablename in the body query of each report but
do not specify the dataset e.g.
This will ensure that the datasets are only built once and then data then shared across each
report that uses it. If you specify the dataset name in the in-line reports, the dataset has to be
rebuilt for that report which will have an impact on performance.
31-May-2017 Construction Industry Solutions
Page 352 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8Report Pre-Processing (Syuds)
Reports in OA have mainly been banded or grouped row reports. There are a few hard
coded exceptions where a grid or matrix of data is presented over a number of pages of the
report.
Pre-Processing provides a generic mechanism to pivot a set of data in to columns and if
required to page over multiple pages to allow any dataset to be processed in to further
datasets that are suitable for printing in OA as matrix of data.
Further pre-processing methods are also provided to manipulate the data set (temp tables),
however they are produced, and create further temp tables with the processed data.
Methods are provided for Union, Merge, and Sum. There is also a debug option provided to
dump the contents of a dataset to the log file and a Store option to store a dataset in a
datamart extract.
31-May-2017 Construction Industry Solutions
Page 353 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.1Syuds.Calc
syuds.calc allows you to create a new table with calculated fields in it from other fields in the
query.
You use calcTable to set the input query (multiple table) and output table name (e.g. Calc to
produce a table called ttCalc)
You then run calc for each field you want to add to ttCalc and pass the following parameters:
name,
data type,
extent,
label,
format,
calc string
Calcexec then builds the ttCalc table, adds the fields you defined and runs the query and
calculates for each row.
Can be very useful for adding extra stuff alongside existing records
The ttCalc record is created with rowid fields for each of the tables in the query so you can
then join to it in a report query
syuds.calc example
Dataset Query:
FOR EACH jc_job WHERE kco = {kco}
Dataset Post Calculation:
method('syuds.calcTable','FOR EACH ttcontract','calc');
method('syuds.calc','lastYTD','decimal',0,'Last YTD','','ttcontract.job_costsTD - ttcontract.job_
costsTY');
method('syuds.calc','lastPTD','decimal',0,'Last PTD','','ttcontract.job_costsTD - ttcontract.job_
costsTP');
method('syuds.calcexec');
31-May-2017 Construction Industry Solutions
Page 354 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Dataset Fields:
Figure 26: Output: ttContract
Figure 27: Output: ttCalc
31-May-2017 Construction Industry Solutions
Page 355 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.2Syuds.Debug
This method causes the contents of a dataset to be exported to the log file. Useful for seeing
the results at various stages of pre-processing.
The parameters are table name, condition, fields (defaults to all fields in the dataset) and the
number of records (if zero specified then 10 will be output).
Figure 28: Dataset Post Calculation
In this example, the first 10 contents of dataset table ttContract will be output
Method('syuds.debug','Contract','','',0);
Output of the data in the log file is in CSV format suitable for pasting in to EXCEL.
31-May-2017 Construction Industry Solutions
Page 356 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Figure 29: Example output:
31-May-2017 Construction Industry Solutions
Page 357 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.3Syuds.Delete
This method deletes a dataset/temp tables from the report. It should be used if the dataset
that has been generated is no longer required but might be rebuilt or reused later in the
report (typically on inline reports).
Method('syuds.delete','CostRev,Budget');
The parameter is table names. The example would delete ttCostRev and ttBudget.
31-May-2017 Construction Industry Solutions
Page 358 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.4Syuds.Filter
This method causes the contents of a dataset to be copied to an identical dataset except that
the records in the output dataset are filter based on a condition passed to the method.
Method('syuds.filter','CostRev','tdate="31/01/13"','CostRevJan');
The parameters are table name, condition, output table name.
The above example would take records from ttCostRev and filter on a condition clause
where field tdate was equal to 31/01/13. The output records would be in ttCostRevJan
which would have the same fields as ttCostRev.
This method is useful on inline reports to filter out a set of records from the containing
report for processing or display on the inline. See also delete() method to delete this dataset
once it has been used.
Also useful to filter a set of records in to a new temp table before storing using store().
31-May-2017 Construction Industry Solutions
Page 359 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.5Syuds.GroupQuery
GroupQuery came about because of report builder and is similar to sum except that they do
multiple sums at different levels.
For example:
group by kco by jgr_group by job_num would create a summary record for:
level 0 (grand total),
level 1 (kco),
Level 2 (group),
Level 3 (job_num).
It equates the footer forms in the report builder and the report footer (level 0).
GroupQuery allows multi table query and takes the form:
Method('syuds.GroupQuery','[query string]','[output table]','[keys]','[sum fields]'
Group is just a simpler form of GroupQuery (for a single table).
Group takes the form:
Method('syuds.Group','[Source Table]','[Condition]','[output table]','[keys]','[sum fields]'
It actually then runs groupQuery with “FOR EACH XXX WHERE condition”
Example:
Method('syuds.group','Source','drev>1000','pcTable','pcKeys','SumFields');
Leaving fields to sum blank will do all decimals
Example:
Dataset Query:
Dataset Post Calculation:
31-May-2017 Construction Industry Solutions
Page 360 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Dataset Fields:
Output:
31-May-2017 Construction Industry Solutions
Page 361 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 362 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.6Syuds.Merge
This method will combine selected columns from two or more dataset (with a common key)
in to a new dataset.
Suppose we have a dataset ttCost
Kco Job_num dCosts
100 1001
100
100 1002
150
And a dataset ttRev
Kco Job_num dRev
100 1001
200
100 1002
250
Then the resulting dataset (ttCostRev) might be
Kco Job_num dCosts dRev
100 1001
100
200
100 1002
150
250
This is achieved in a report initialisation calculation as follows:
Method('syuds.mergeKeys','kco,job_num');
Method('syuds.mergeTable','cost','','','','');
Method('syuds.mergeTable','rev','','','','');
Method('syuds.mergeExec','CostRev');
mergeKeys is used to specify the unique keys used to merge the data.
mergeTable is called once for each table to be merged. The first parameter is the dataset
name (without the tt prefix), the second parameter is the condition to be applied to this set of
records, the third parameter is the key field names in this table (defaults to the mergeKeys),
31-May-2017 Construction Industry Solutions
Page 363 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
the fourth parameter is the field names (in this table) to be combined, the fifth parameter is
the name of the fields in the output dataset.
e.g. Method('syuds.mergeTable','cost','WHERE dCosts > 0','kco,job_num','dCosts','dMyCosts');
would take only records with costs greater than zero and using kco and job_num from this
record write dCosts in to a combined field called dMyCosts.
A short version is also available with default options.
Method('syuds.merge','cost,rev','kco,job_num','CostRev');
This is equivalent to the series of calls above. Datasets ttCost and ttRev are combined using
kco and job_num (in all tables) and all fields from the two datasets are combined and
returned in ttCostRev.
Decimal values will be summed in the combined dataset. All other field types will be written
from the last record to be combined. It is expected that the record to be merged would
already be unique on the keys.
31-May-2017 Construction Industry Solutions
Page 364 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.7Syuds.Pivot
A new program has been introduced that is designed to be called in the initialize calculation
of an OA report. It is handed a dataset name and a series of criteria and transforms the
named dataset in to three dynamic datasets which are designed to be easier to print in a
matrix.
Syuds.Pivot take the following form:
method('syuds.pivot','[Source]','sumtype='[]'','[Row Fields]','[Column Fields]','[Sum Fields]',
[Columns],[Total Column]);
Source
the name of the temp table source data that is required to be pivoted
SumType
sumtype="" is a condition to extract only selected records. SumType='' will
extract alll records
Row Fields
the fields that will be used to create unique rows in the resulting pivoted
dataset
Column Fields
The field(s) which will be used to create the columns of the array of data in
the resulting pivoted dataset
Sum Fields
the fields to be be summed and added to the resulting pivot dataset
Columns
the number of columns per page
Total Column
1 means add a total column (the sum of all the columns on the report), 0
means no total column and instead a total field will be added
The following calculation might be used in the initiation calculation of a report which
contains a dataset ttTest. The dataset ttTest can be any type of temp table generated and
prepared for a report.
method('syuds.pivot','Test','sumtype=""','acctcode,acctname','kco','acctturn,acctpay',2,1);
31-May-2017 Construction Industry Solutions
Page 365 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Suppose we had the following data :
1
A
Table ttTest
Acctname
Accturn
Supplier A
100
2
A
Supplier A
150
0
3
A
Supplier A
200
100
A
Supplier A
450
150
B
Supplier B
300
300
B
Supplier B
300
300
Kco
1
Acctcode
Acctpay
50
Sumtype
TOT
TOT
Running the pivot method above would result in three temp tables being created.
Table
ttTestPage
ttTestRow
ttTestCol
Description
containing page and column information
containing row data
containing column data
31-May-2017 Construction Industry Solutions
Page 366 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Table ttTestPage
iPageSequence iColumn cColumnLabel__1 cColumnLabel__2 bUsed__1 bUsed__2 bFirst bLast Kco_1 Kco2
1
1
1
2
Yes
Yes
Yes
No
1
2
2
3
3
Total
Yes
Yes
No
Yes 3
?
Table ttTextCol
iColumn
1
2
3
4
iPageSequence
1
1
2
2
iPageColumn
1
2
1
2
cColumnLabel
bTotalColumn
1
2
3
4
No
No
No
Yes
Kco
1
2
3
?
Table: ttTestRow
iCount_ iCount_ iCount_ iCount_ Acctturn_ Acctturn_ Acctturn_ Acctturn_ Acctpay_ Acctpay_ Acctpay_ Acctpay_
Acctnum Acctname
_1
_2
_3
_4
_1
_2
_3
_4
_1
_2
_3
_4
A
B
Supplier 1
A
Supplier 1
B
1
1
3
100
150
200
450
50
0
100
150
0
0
1
300
0
0
300
300
0
0
300
If the total options is set to zero (no) then the final array entry is suppressed and separate
total fields are created iCountTotal, AcctTurnTotal and AcctPayTotal with the values as you
would expect.
The records with SumType=TOT would not be processed because they were excluded with
the query condition.
If a page size of 0 is specified then no paging will take place and a single ttPage record
(iPageSequence=1) will be produced with the extent of the value fields being the same as the
number of columns.
Report Design
The temp tables (ttTestRow and ttTestPage) produced are designed to be used in OA
designer and there are supporting methods and techniques to allow a matrix report to be
built.
The query used on the report should be FOR EACH ttTestPage, EACH ttTestRow. This will
repeat all the rows on each page sequence (assuming there are multiple sequences of pages
for all the columns to be fitted on).
31-May-2017 Construction Industry Solutions
Page 367 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The sort order should include the page sequence at the top to allow the pages to come out in
the correct sequence.
31-May-2017 Construction Industry Solutions
Page 368 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
You should apply a hard page to the iPageSequence level.
The fields of the report should be set out as you require using fields from the ttTestRow
temp table. The columns of the matrix can be specified using {ttTestPage.iColumn__n} where
n is the page column number. The columns can be labeled using {ttPage.cColumnLabel__n}
where n is the page column number. The total column will have a label of “TOTAL" in this
field. The column fields are also replicated in ttPage.cKco__n except that the total column
will have a ? value in it.
31-May-2017 Construction Industry Solutions
Page 369 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
A build condition should be used on the column fields so that they are not built when not
used. The syuds.buildColumnUsed condition takes two parts to the parameter. The table
name TEST (without the tt) and the page column number.
Sample Output
With a total field
31-May-2017 Construction Industry Solutions
Page 370 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
With a total column
31-May-2017 Construction Industry Solutions
Page 371 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.8Repeat
This method removes repeated fields from a temp table. Typical usage is if the data set
contains header and detail data and the repeating header details only want to be shown (and
aggregated) once. This method will allow you to manipulate the dataset so that repeated
values only appear once.
Method('syuds.repeatsource','Source','kco,job_num');
Method('syuds.repeatfields','1','kco,coc_name');
Method('syuds.repeatfields','2','job_num,job_name,RO_job_costs^TD');
Method('syuds.repeatExec');
The ttSource table will be replaced with a copy where the repeating fields kco, coc_name
and job_num,job_name are shown once per kco and job_num sort sequence.
repeatSource specifies the source table and the sort fields to be used.
repeatFields specifies for each of the sort sequence the fields that should be shown just once
In this example RO_job_costs^TD (and job_num and job_name) are shown only once for each
job_num within kco. This would allow this column to be aggregated on the report.
repeatExec actually performs the repeat field blanking and saves the temp table overwriting
the original source data.
31-May-2017 Construction Industry Solutions
Page 372 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.9Syuds.Store
This option is identical to the data mart writing on the tail end of a report except that you
control the date/time of the extract.
The datamart must be defined in the usual way and the mapping of the fields in the datamart
to the fields in the dataset must be configured.
For example
Method('syuds.store',100,'job,cost','JOBDM,COSTDM',TODAY,0);
Would store the dataset ttJob in datamart JOBDM and similarly dataset ttCost in datamart
COSTDM with an extract date of midnight on the day of running in company 100. The
extract date would be expected to be a report input/selection value.
31-May-2017 Construction Industry Solutions
Page 373 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.10
Sum
This method will combine and sum rows from two or more dataset in to one or more new
datasets.
Suppose we have a dataset ttCostRev
Kco Job_num dCosts dRev
100 1000
100
150
100 1001
200
250
100 1002
0
100
100 1003
100
0
Then the resulting dataset ttKcoSum
Kco dCosts dRev
100 400
500
would be produced with the following commands
Method('syuds.sumSource','CostRev','');
Method('syuds.sumTable','KcoSum','kco','','dCosts,dRev');
Method('syuds.sumExec');
SumSource specifies the input dataset and a condition to apply to that set of records.
sumTable specifies the output summary required. The first parameter is the output dataset
name (without the tt prefix), the second parameter is the key fields, the third parameter is
other fields to be assigned (similar to key fields but not used to find uniqueness e.g.
keys=kco, fields=coc_name), the fourth parameter is the fields to sum.
sumExec executes the summing and creates the required output datasets. Multiple sumTable
methods may be used to create multiple summaries on a single pass through the source data.
A short version with defaults exists
Method('syuds.sum','CostRev','','KcoSum','kco','','dCosts,dRev');
31-May-2017 Construction Industry Solutions
Page 374 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
With the following parameters input table, condition, output table, keys, fields, sum fields.
31-May-2017 Construction Industry Solutions
Page 375 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.11
TableAlias
Method('syuds.tableAlias','source','output');
This takes a table and renames it for the purposes of using a table multiple times.
1 st parameter is the source dataset table and the 2 nd parameter is the new dataset table.
31-May-2017 Construction Industry Solutions
Page 376 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.12
Syuds.TimeSlice()
This is a new method in syuds.p to manipulate an input dataset or datasets in to a new
summarized dataset which has a date/time element.
The method can be called like any other post processing method on a dataset, for example
method('syuds.timeslice','FOR EACH ttStats','TimeStats','{fromtime}','{totime}',{interval},'
{timeunit}','moe_key1,moe_key2','moc_snapshot','')
The parameters are as follows:
1 Query
The query to be run against existing dataset(s) which will return a set of
record containing the data that is to be time sliced
2 TableName The output table name
3 From
A string containing a valid from date or date/time (depending on the units
Date/Time being used). If omitted then the time range will not be completed and records
will only exist for the data being processed
4 To
Same as From date/time
Date/Time
5 Interval
An integer value to be used in conjunction with the time unit field to allow
the creation of the complete set of time records
6 Time Unit “S”econds (for date/time), “D”ay, “W”eek,”M”onth,”Y”ear
7 Keys
The key fields used to summarise the data. Can be left blank and just the
time element will be used
8 Time Key
The field in the source data that contains the date/time field to be used to
slice the data
9 Fields
The fields from the source data to be aggregated. If left blank then ALL
decimal fields in the source tables will be aggregated.
For each field that is aggregated the total, max, min and average values for the
time slice will be evaluated.
If the Time Unit field is “S” for seconds then the Interval is the number of seconds for each
time slice and the start and end date/time values are date/time format strings. E.g.
From=15/01/16 08:00&To=15/01/16 18:00&Interval=3600 would produce hourly slices
from 8am until 6pm.
31-May-2017 Construction Industry Solutions
Page 377 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If the Time Unit field is “D” for days then the interval is not used and single day records are
produced between the from and to dates.
If the Time Unit field is “W” for weeks then the interval indicates the day of the week for
the week ending i.e. 1 for Sunday to 6 for Saturday. Week end dates for that day are then
produced between the start and end dates.
If the Time Unit is “M” for months then the interval is ignored and calendar month end dates
are used between the start and end dates.
If the Time Unit is “Y” for years then the interval is ignored and calendar year end dates are
used between the start and end dates.
The results dataset will contain four fields for each of the aggregated fields (one of the same
name for the total and then extensions min, max and avg for the other three values). A count
is always added plus the unique grouping key and key date/time.
31-May-2017 Construction Industry Solutions
Page 378 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.13
Top
This method returns the Top n records within a dataset when a sort is defined.
Method('syuds.top','FullList','drev>100000','by drev descending',10,'Top10Rec');
The 1 st parameter is the source temp-table. The 2 nd parameter is the condition applied to
the query, the 3 rd parameter is the sort order, the 4 th parameter is the number of records
returned , the 5 th parameter is the output table name.
In the example above it is taking all the records from the ttFullList table and for records
which revenue exceeds 100000 then it sorts it by the revenue field (highest to lowest) and
returns the top 10 records into a table called ttTop10Rec.
31-May-2017 Construction Industry Solutions
Page 379 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
7.13.8.14
Union
This method will combine rows from two or more dataset in to a new dataset.
Suppose we have a dataset ttCost
Kco Job_num dCosts
100 1001
100
100 1002
150
And a dataset ttRev
Kco Job_num dRev
100 1001
200
100 1002
250
Then the resulting dataset (ttCostRev) might be
Kco Job_num dCosts dRev
100 1001
100
0
100 1002
150
0
100 1001
0
200
100 1002
0
250
This would be achieved with the following method calls.
Method('syuds.unionFields','kco,job_num,dCosts,dRev');
Method('syuds.unionTable','cost','','kco,job_num,dCosts,');
Method('syuds.unionTable','rev','','kco,job_num,,dRev');
Method('syuds.unionExec','CostRev');
unionFields specifies the fields in the returned dataset.
31-May-2017 Construction Industry Solutions
Page 380 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
unionTable specifies the source dataset to combine. The first parameter is the dataset name
(without the tt prefix), the second parameter is a condition for the records to select from this
source dataset, the third parameter is the fields to combine.
unionExec specifies the output dataset and executes the union.
If the fields specified are the same then the values are combined in to the same field
e.g.
Method('syuds.unionFields','kco,job_num,dValue');
Method('syuds.unionTable','cost','','kco,job_num,dCosts');
Method('syuds.unionTable','rev','','kco,job_num,dRev');
Method('syuds.unionExec','CostRev');
Would produce the output dataset
Kco Job_num dValue
100 1001
100
100 1002
150
100 1001
200
100 1002
250
There is also a short version with default options.
Method('syuds.union','cost,rev','kco,job_num,dCosts,dRev','CostRev');
ttCost and ttRev would be combined with fields kco,job_num,dCosts,dRev in to dataset
CostRev. This is equivalent to the first example above.
31-May-2017 Construction Industry Solutions
Page 381 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8
Workflow Overview
People are most productive when they are doing the things they are good at –
thinking, communicating, creating. They are least productive and most prone to error
when they are involved in boring, repetitive processes. Just the opposite is true of
systems.
Businesses are therefore most efficient when they have the three key resources of people,
processes, and systems properly balanced, integrated, and focused on their strengths:
People developing and implementing processes and new ways of
working.
Processes that optimise quality, consistency, timeliness, and
governance/audit.
Systems that facilitate the way people work by automating the core
processes.
COINS Workflow brings the benefits of this integration to construction businesses.
By using workflows within COINS, customers can automate routine but essential
processes such as invoice approval, employee expense processing, purchase orders,
and site requisitions. This frees costly people resources to focus on improving and
managing the business.
8.1 Business Benefits
Because of its flexibility, the applications and benefits of COINS Workflow are
limited only by your imagination. Key business benefits include:
l
l
Process cost reduction.
Improved productivity for professional staff, who can spend less time on
repetitive processes and more on managing the business.
l
Improved process resilience and reduced dependence on individuals.
l
Enhanced environmental responsibility through reduced reliance on paper.
l
Enhanced audit trail.
31-May-2017 Construction Industry Solutions
Page 382 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.2 The COINS Workflow toolkit
Whether COINS workflow is configured by consultants from the Business
Intelligence Team or by customers’ own technical staff, the same toolkit is available.
Its key features include:
l
l
l
l
l
l
l
l
l
l
l
l
l
Triggering workflow processes by incoming documents, events within the
COINS database (such as a value being exceeded), or manually.
Multiple workflow branches to allow parallel processes, optionally
Merging back together once each branch has completed. Conditional
branching enables the implementation of complex authorization levels and
procedures.
Workflow tasks and stages assigned to individuals or groups.
User alerts communicated by email, SMS text message, or through a
COINS workbench on a PC or a PDA.
Full integration with all COINS modules, with access to every database
table and function.
User management of tasks and events through the COINS Activity
Workbench, with links directly to the COINS item or transaction to be
processed.
Integration with Microsoft® Outlook®, including linking an email back to a
COINS transaction.
Full security provided through the COINS Business Logic Layer.
Full audit trail of all workflow activities, with tracking of all current and
completed workflows.
Automatic escalations managed with defined task duration.
Delegation of workflow actions during vacations or other absences, with
expiration dates.
Integrated Document Management with the ability to read data from
scanned documents into workflow processes and COINS input screens,
avoiding manual processing. Document Management items can be created
automatically from COINS alerts, emails and SMS messages.
31-May-2017 Construction Industry Solutions
Page 383 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.3 Example Workflow
8.3.1
31-May-2017 Construction Industry Solutions
Page 384 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.4 Workflow Groups
Workflow groups are simply a means to organise Workflows into business areas, for
example Procurement, HR, Purchase Ledger etc. At a later stage you can specify
which roles belong to a group; and if you then assign a Workflow to a group, any
member of the group can action it (see Workflow Roles and Users).
Field
Group
Description
The workflow group code. Use this code to group roles and workflow
templates.
Description The description of the workflow group.
31-May-2017 Construction Industry Solutions
Page 385 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.5 Workflow Roles
As part of the design of a workflow, it is necessary to define who in an organisation is
going to be responsible for all or part of the workflow processes. Typically a role will
fall to a business role such as a Financial Manager or Purchase Ledger Supervisor, or
indeed a team of people such as a Buying Team.
Create a Workflow Role by assigning a code and description. The workflow roles will
require a responsibility type and where appropriate a key or keys.
Field
Description
Role
The workflow role code.
Description
The description of the workflow role
Group
The workflow group code (see Workflow Groups). Use this
code to group roles and workflow templates. May be left blank
Responsibility
This code allows you to specify, for this role, what is the
Type
workflow going to use for routing.
DO NOT use either CONTRACT or COMPANY as a
31-May-2017 Construction Industry Solutions
Page 386 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
responsibility type as these are reserved words with a specific
use within Workflow setup.
Key
The key that corresponds to the responsibility table keys. The
keys must be defined as variables in the workflow to allow the
correct allocation of people to stages.
Where the Responsibility Type relates to a group, then the key may
be left blank
8.5.1 Example Roles
In this example, the Responsibility Type has been defined as LOCATION and the key
has defined as jcl_loc (Contract Location).
This will allow the workflow to determine the responsibility from the Contract
Location code on a transaction.
In the second example, the role of Site Manager is defined as using Contract
information to route the workflow by use of the job_num field on a transaction.
Please remember DO NOT use either CONTRACT or COMPANY as a responsibility
type as these are reserved words with a specific use within Workflow setup.
31-May-2017 Construction Industry Solutions
Page 387 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.6 Workflow Responsibilities
Once Roles have been defined within the system, their responsibilities within the
workflow may be configured. Workflow Responsibilities are used to convert roles set
in a workflow to actual user IDs.
In Role Maintenance a role is associated with a type and up to 3 variables (These variables
are defined within a workflow).
In Responsibility Maintenance a series of records are created that map possible values of
these variables to one or more user IDs. When the role is used in a workflow stage and the
values match then the user IDs are used.
Field
Description
Type
This code is referenced when setting up a workflow
role. Use Workflow Responsibility to set up different
responsibilities depending on the value of a variable
defined in the workflow.
Keys 1
The appropriate values of the Role key.
–3
The value in these key fields corresponds to the variable set
in the equivalent key of the role that is linked to this
responsibility (see role maintenance).
If the value of this variable set at the workflow stage where
the associated role is used matches this responsibility value
(along with the other two key fields) then the user ids
configured on this responsibility are used in that workflow
stage.
Role
The person who must action this stage
Users
The user or users who are responsible for this role in
a workflow. These must be users’ setup already
within the COINS system.
8.6.1 Example Responsibilities
In this example, the role of JOBMAN has been defined in the Workflow Roles with
job_num as a key.
31-May-2017 Construction Industry Solutions
Page 388 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
In the Responsibility setup JOBMAN is defined with the key set to 1000 and a user
list entered. This indicates that a task referencing Contract 1000 will be routed to
the users niglon and kerbro
31-May-2017 Construction Industry Solutions
Page 389 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.7 User Workflow Responsibilities
On occasions it is desirable to be able to find and amend all the role assignments for a
user. This can be done by searching through the responsibilities maintenance screen
but it is possible for COINS to do this for you. This might be useful if a user leaves
the business and a new user is to be assigned to each of their role responsibilities.
The User Workflow Responsibility maintenance screen shows a list of users. Select
the link on the user for which you want to maintain responsibilities. All responsibility
records which contain the selected user are shown for update.
31-May-2017 Construction Industry Solutions
Page 390 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
These records can now be amended. When amending the user name, please note
that the new user must be licenced for workflow.
The regenerate button can be pressed to regenerate the list. The button can be used
to go back to the user selection screen.
31-May-2017 Construction Industry Solutions
Page 391 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.8 Workflow Delegation
Once all roles and responsibilities have been configured it is possible to delegate
actions and tasks for users temporarily, for example during periods of annual leave.
When a workflow task is assigned to a user this table of delegations is consulted. If a
record for the specific role exists for the user then that is used. If not then the
record for all roles is used if it exists. If neither record is found then no delegation
takes place and the original user is assigned the task. The date that the task is
assigned is used to find the delegation record with the correct date range.
Simply define the user and role to be delegated. If the user belongs to several roles,
you can enter more than one delegation record and assign each role to another user
individually, or you may specify ALL and simply allocate all roles to another user.
Each delegation record may have each a unique start date. A blank start date is
allowed indicating the delegation has no start date. A blank end date is also allowed
indicating no end date.
Workflow Delegation is intended to stop new actions and tasks being assigned to a
user who is unavailable. Any current actions and tasks will need to be reassigned
manually.
A company specific delegation is also now available. If the company specific
delegation is specified (in each company) then it is used. If it is blank then the global
delegation is used.
31-May-2017 Construction Industry Solutions
Page 392 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The following business rules are applied:
l
You are not allowed to overlap from/to dates for a single combination of user and role.
i.e. only one delegation can apply on a single date.
l
The user must be valid and licenced for workflow
l
The delegate must be valid and licenced for workflow
l
The user and the delegate cannot be the same user
l
The company delegate can be blank indicating the global delegate should be used.
l
The global delegate can be left blank indicating that no delegation is to be done. This can
be useful to leave the role records in place and just assign and remove the delegation as
required.
31-May-2017 Construction Industry Solutions
Page 393 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.8.1 Self-Service Workflow Delegation
When a user who takes part in a workflow is going to be absent from work they will
wish to delegate the roles they fulfil to one or more other users.
This can be done in the delegation maintenance procedure described above however
the delegation maintenance routine gives access to all users’ delegations so is not
appropriate for many users.
A function is provided that allows the user to set up and maintain delegations for
themselves only. A new tab is shown on the user preferences for the user when they
are logged in; if they are licenced for workflow.
This screen shows the same information as the full delegation maintenance screen
except that the user is fixed and shown in the header. The same rules apply for
setting of the delegations as in the full version.
There is a button provided in the footer
that will scan all
workflow assignments in all companies and build one delegation record per role. This
is an aid to the user to ensure they do not miss a role. The records are created with a
blank delegation (i.e. no delegation) but the record being present is a reminder to set
it if required. They can be deleted or left blank if no delegation is required.
31-May-2017 Construction Industry Solutions
Page 394 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9 Workflow Templates
This option allows you to add and maintain the workflow definitions.
Each workflow template is defined across a number of tabs
31-May-2017 Construction Industry Solutions
Page 395 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.1 WF Template - Details Tab
Field
Description
Workflow
Workflow template code.
Description The workflow template description.
Group
The workflow group code. Use this code to group roles and workflow
templates.
31-May-2017 Construction Industry Solutions
Page 396 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Status
The status of the template.
Edit - The workflow is not live; you can still edit and test it. NB. Edit
has a limit of 25 active records before requiring a purge of
transactions or changing the status of the workflow to Live.
Live - The workflow is live and you can no longer edit the logical fields
involved in the workflow. There is a limited number of fields which
are editable.
Retired - The workflow is no longer live leaving the active stages to
continue but not allowing new workflows to be launched.Your licence
limits the number of live workflows you can have. If you want to
change an existing workflow, you must retire the original, copy it in
edit mode and edit the copied workflow. (See Appendix A for details
on Workflow Licensing).
Documents The COINS table(s) that are to be associated with the workflow.
If this is filled in, the user must select a record from this table in order
to run this workflow. The workflow can be independent of any
particular table, in which case this can be blank.
Prepare
This is a calculation that takes place prior to the document load and
can be used to assign specific RSP if not that of the standard table.
This would be on recommendation and advice from COINS BI Team.
This is not a field that would normally be used in workflow.
Initialise
The initial calculations that are performed at the initiation of the
workflow.
A variable of $TaskID must be initialised on each workflow. This will
be the identifier for each instance of the workflow and is shown in the
description of stage tasks, for example the internal reference of a
transaction.
The initialisation uses standard COINS calculation syntax (see
associated documentation) and can also use standard COINS Methods.
Monitor
The user who COINS should alert with a duplicate task if a stage
extends beyond the expected duration. The monitor specified on the
template will be used unless there is a specific monitor specified on
the stage itself. – see Workflow Monitors below for more detail.
Monitor
Status
A check box which will indicate if the workflow is to appear on the
Monitor Tab on the Workflow Monitor.
31-May-2017 Construction Industry Solutions
Page 397 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Test
The URL/ROWID to be processed if the workflow is started for test
purposes when in edit mode.
Below is an example of a workflow template; including examples of initialisation
calculations which may be required and a Test Invoice which will enable to launch a
test workflow.
31-May-2017 Construction Industry Solutions
Page 398 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2 WF Template - Stages Tab
Workflow Template Stages allows you to define the stages that make up the
workflow.
Field
Description
Label
Label of the stage. Used to link other stages to this one.
Description Description of the stage. This is the text that will appear in the user's
Activity Workbench, along with the general description of the
workflow and the task ID.
If another stage links to this stage, this description will appear on the
Next Stage list for the stage that links to it.
Role
The role that must action this stage. (You can use a role calculation to
manipulate this further.)
Type
The type of stage process that should be performed (see Workflow
Stage Types).
Link(s)
A list of the labels of other stages that are linked to this stage.
End
Whether this stage is an end stage. The workflow stops if it reaches an
end stage.
31-May-2017 Construction Industry Solutions
Page 399 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
There are currently 10 types of workflow stage available, each will require a Label
and a Description. The description will appear as the description in the Activity
Workbench for the stage (with the Workflow TaskID reference). The label is used to
determine the links between stages. The Id which is shown on screen will be
automatically assigned and is useful when debugging the workflow with the tools on
the Check tab (see documentation further on in this document).
The workflow role will determine who will be assigned a stage or task in the
workflow. A role can be one of three options:
Role
When a stage is assigned to a role COINS will cross reference the Role
and the associated Responsibilities and assign the stage to the
appropriate User(s). It will then perform the Role Calculation.
Group
The person who is handing on the task may select an individual, or assign
it to everyone in the list.
When a workflow stage is assigned to a Group, the appropriate activity
will be assigned to every member of the group and will appear on each
member’s Activity Workbench.
Individual Any stage can simply be assigned to an individual.
If the role calculation result is a list, the user who is handing on the task must first
select one individual from the list to be the person to action the task.
An individual can also be calculated from the Workflow document or ‘hard-coded’
into the role calculation.
If any stage is assigned to more than one user, the task will appear on each user's
workbench. As soon as one user assigns their task to a status of anything other than
‘Not Started’ the corresponding tasks on all other users Workbenches will be
completed. It will remain available for view and will be automatically updated with
the progress and user of who has started the task. If they put the status back to “Not
Started” then the task will be replaced on all the users in the group again.
Once any of the tasks are completed all tasks on other user’s workbenches are then
completed.
An individual being assigned a task from any of the options above must be a valid
COINS User and must be licensed for Workflow.
31-May-2017 Construction Industry Solutions
Page 400 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If an Email stage is being used, a valid email address needs to be assigned either
against the User ID, or if appropriate, the associated COINS HR Personnel record. If
an SMS stage is to be used it is necessary to have an associated HR record so that
COINS can access the appropriate mobile telephone number.
31-May-2017 Construction Industry Solutions
Page 401 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.1 WF Stages - Appointment
An appointment will be created on the Users’ Activity Workbench. The workflow will
proceed to the next stage immediately.
Field
Description
Role Calculation
A calculation to determine the user (or users) who must action
this stage; used as an alternative to the Role. This calculation
must result in one or more user names. If the role above is
specified, the calculation variable “this” is assigned as the
result of the role assignment. This can then be further
manipulated by this calculation as required.
Check
Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an
assigned Role, delegation will not automatically kick-in - so if
they are away the calculated role will always apply. You can
now set it to check for delegation by ticking this field
31-May-2017 Construction Industry Solutions
Page 402 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Select User
Description
If the Role or Role Calculation results in a list of users, this
determines how COINS treats the list.
Role - Whatever the result of the Role or Role Calculation
fields is, use that. If the result is two or more users, the task
will appear on each user's workbench, but only one of them
has to action the task.
Individual - If the result is a list, the user who is handing on the
task must first select one individual from the list to be the
person to action the task.
Group - The person who is handing on the task may select an
individual, or assign it to everyone in the list.
Pre Calculation
Calculation to be performed before the stage. For example,
you could use this to throw an error if a certain condition
hasn't been met before the stage is run.
Post Calculation
Calculation to be performed after the stage. For example, you
could use this to send an email when the stage has been
completed.
Next
The label of another stage to which this stage is linked.
Activity Type
Select the type of appointment or task from the drop down
list. The types are user-defined; use Action Types to set them
up.
Priority
The priority of the action. You can set an action be either of
high, normal or low importance.
Function
The code for the function that this stage links to (plus any
function parameters).
31-May-2017 Construction Industry Solutions
Page 403 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Duration
Whether this stage has a duration associated with it. If
the stage has duration, the entry on the Activity
Workbench will turn red if the stage is overdue.
Ticking this will allow the following to be defined:
The duration of the stage (in the units shown in the
next field).
The units for the duration of the stage.
When the duration is calculated from:
Absolute = From the start of the workflow.
Relative = From the start of this stage.
Monitor
The person whom COINS should notify if the stage is overdue.
If the stage is overdue, COINS creates a duplicate action on
the monitor's workbench, as an escalation type activity.
Associated Parameters - SY/WFESC
The activity workbench activity type to create if a workflow is
escalated to the workflow monitor.
You can configure different activity types for the activity
workbench so that these escalation tasks stand out.
Reminder Whether to generate an Outlook reminder for the task. If you
are using Outlook integration, this will generate an Outlook
reminder for the user.
31-May-2017 Construction Industry Solutions
Page 404 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.2 WF Stages - Delay
A time delay can be added to a workflow. Simply define a number, the unit of time
and whether the delay should be relative to the stage or absolute to the workflow.
F
i
e
Description
l
d
Che
ck
Calc
ulati
on
Resu
lt for
Dele
gatio
n
If a workflow stage uses a role calculation, instead of an assigned Role,
delegation will not automatically kick-in - so if they are away the calculated
role will always apply. You can now set it to check for delegation by ticking
this field
31-May-2017 Construction Industry Solutions
Page 405 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
F
i
e
Description
l
d
Pre Calculation to be performed before the stage. For example, you could use this
Calc to throw an error if a certain condition hasn't been met before the stage is
ulati run.
on
Post Calculation to be performed after the stage. For example, you could use this
Calc to send an email when the stage has been completed.
ulati
on
Next The label of another stage to which this stage is linked.
Dura Whether this stage has a duration associated with it. If the stage has a
tion duration, the entry on the Activity Workbench will turn red if the stage is
overdue. Ticking this will allow the following to be defined:
The duration of the stage (in the units shown in the next field).
When the duration is calculated from:
Absolute = From the start of the workflow.
Relative = From the start of this stage.
31-May-2017 Construction Industry Solutions
Page 406 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.3 WF Stages - Email
The workflow can send emails based on the role. Define the Subject and Text of the
email. Curly braces {} can be used to allow replacement of pertinent details relating to
the specific workflow.
Field
Role
Calculation
Description
A calculation to determine the user (or users) who must action this
stage; used as an alternative to the Role. This calculation must result
in one or more user names. If the role above is specified, the
calculation variable “this” is assigned as the result of the role
assignment. This can then be further manipulated by this calculation
as required.
31-May-2017 Construction Industry Solutions
Page 407 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Check
Calculation
Result for
Delegation
Description
If a workflow stage uses a role calculation, instead of an assigned Role,
delegation will not automatically kick-in - so if they are away the
calculated role will always apply. You can now set it to check for
delegation by ticking this field
Select User If the Role or Role Calculation results in a list of users, this determines
how COINS treats the list.
Role - Whatever the result of the Role or Role Calculation fields is,
use that. If the result is two or more users, the task will appear on
each user's workbench, but only one of them has to action the task.
Individual - If the result is a list, the user who is handing on the task
must first select one individual from the list to be the person to action
the task.
Group - The person who is handing on the task may select an
individual, or assign it to everyone in the list.
Pre
Calculation
Calculation to be performed before the stage. For example, you could
use this to throw an error if a certain condition hasn't been met
before the stage is run.
Post
Calculation
Calculation to be performed after the stage. For example, you could
use this to send an email when the stage has been completed.
Next
The label of another stage to which this stage is linked.
Subject
Subject of the email that will be sent for this stage of the workflow.
HTML
Email
Select if the email should be formatted with HTML
Text
The text of the email that will be sent for this stage of the workflow.
Store in
Document
Manager
Whether the message sent should be stored in document manager.
31-May-2017 Construction Industry Solutions
Page 408 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.4 WF Stages - Fork
A fork is added to create multiple branches in a workflow.
Field
Description
Check
Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an assigned Role,
delegation will not automatically kick-in - so if they are away the
calculated role will always apply. You can now set it to check for
delegation by ticking this field
Pre
Calculation to be performed before the stage. For example, you could
Calculation use this to throw an error if a certain condition hasn't been met before
the stage is run.
Post
Calculation to be performed after the stage. For example, you could
Calculation use this to send an email when the stage has been completed.
Link
The label of another stage to which this stage is linked.
Condition
A condition that must be true to enable the link. If this calculation
evaluates to zero the link on this page is not enabled. If the calculation
evaluates to a non-zero, or is blank, the link is enabled.
31-May-2017 Construction Industry Solutions
Page 409 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
In this example a fork is defined based on the results of a test against the values of a
table field.
31-May-2017 Construction Industry Solutions
Page 410 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.5 WF Stages - Merge
A merge stage is used to bring two or more forks of a workflow back together. The
merge stage will not be completed until all stages linked to it are complete.
Field
Description
Check
Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an assigned Role,
delegation will not automatically kick-in - so if they are away the
calculated role will always apply. You can now set it to check for
delegation by ticking this field
Pre
Calculation to be performed before the stage. For example, you could
Calculation use this to throw an error if a certain condition hasn't been met before
the stage is run.
Post
Calculation to be performed after the stage. For example, you could
Calculation use this to send an email when the stage has been completed.
Link
The label of another stage to which this stage is linked.
31-May-2017 Construction Industry Solutions
Page 411 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Condition
A condition that must be true to enable the link. If this calculation
evaluates to zero the link on this page is not enabled. If the calculation
evaluates to a non-zero, or is blank, the link is enabled.
31-May-2017 Construction Industry Solutions
Page 412 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.6 WF Stages - Process
A process stage can be used to perform a calculation, usually against the COINS
database within the calculation. Processes do not require user interaction.
Field
Description
Check Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an
assigned Role, delegation will not automatically kick-in - so if
they are away the calculated role will always apply. You can
now set it to check for delegation by ticking this field
Calculation
Calculation to be performed – update a hold code for
example (see below)
Next
The label of another stage to which this stage is linked.
Figure 30: Generating an error message if a condition is not met.
31-May-2017 Construction Industry Solutions
Page 413 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Figure 31: Approving an Invoice (releasing hold codes)
31-May-2017 Construction Industry Solutions
Page 414 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.7 WF Stages - SMS
It is possible to send information from the workflow via SMS (assuming the necessary
configuration to allow SMS from COINS has been completed).
Field
Description
Role
A calculation to determine the user (or users) who must action this
Calculation stage; used as an alternative to the Role. This calculation must result in
one or more user names. If the role above is specified, the calculation
variable “this” is assigned as the result of the role assignment. This can
then be further manipulated by this calculation as required.
31-May-2017 Construction Industry Solutions
Page 415 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Check
Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an assigned Role,
delegation will not automatically kick-in - so if they are away the
calculated role will always apply. You can now set it to check for
delegation by ticking this field
Select User If the Role or Role Calculation results in a list of users, this determines
how COINS treats the list.
Role - Whatever the result of the Role or Role Calculation fields is, use
that. If the result is two or more users, the task will appear on each
user's workbench, but only one of them has to action the task.
Individual - If the result is a list, the user who is handing on the task
must first select one individual from the list to be the person to action
the task.
Group - The person who is handing on the task may select an
individual, or assign it to everyone in the list.
Pre
Calculation to be performed before the stage. For example, you could
Calculation use this to throw an error if a certain condition hasn't been met before
the stage is run.
Post
Calculation to be performed after the stage. For example, you could
Calculation use this to send an email when the stage has been completed.
Next
The label of another stage to which this stage is linked.
Text
The text of the SMSl that will be sent for this stage of the workflow.
Store in
Document
Manager
Whether the message sent should be stored in document manager.
31-May-2017 Construction Industry Solutions
Page 416 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.8 WF Stages - Stage
A stage is where the workflow will require user interaction to complete the required
part of the process and move the workflow onto the next stage.
31-May-2017 Construction Industry Solutions
Page 417 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Role Calculation
A calculation to determine the user (or users) who must action
this stage; used as an alternative to the Role. This calculation
must result in one or more user names. If the role above is
specified, the calculation variable “this” is assigned as the result
of the role assignment. This can then be further manipulated by
this calculation as required.
Check
Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an assigned
Role, delegation will not automatically kick-in - so if they are
away the calculated role will always apply. You can now set it to
check for delegation by ticking this field
Select User
If the Role or Role Calculation results in a list of users, this
determines how COINS treats the list.
Role - Whatever the result of the Role or Role Calculation fields
is, use that. If the result is two or more users, the task will
appear on each user's workbench, but only one of them has to
action the task.
Individual - If the result is a list, the user who is handing on the
task must first select one individual from the list to be the person
to action the task.
Group - The person who is handing on the task may select an
individual, or assign it to everyone in the list.
Pre Calculation
Calculation to be performed before the stage. For example, you
could use this to throw an error if a certain condition hasn't been
met before the stage is run.
Post Calculation
Calculation to be performed after the stage. For example, you
could use this to send an email when the stage has been
completed.
Link
The label of another stage to which this stage is linked.
Condition
A condition that must be true to enable the link. If this
calculation evaluates to zero the link on this page is not enabled.
If the calculation evaluates to a non-zero, or is blank, the link is
enabled.
If no condition is specified, the user must manually decide which
of the specified links is to be enabled.
31-May-2017 Construction Industry Solutions
Page 418 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Default Link
A default link can be specified on a stage of type STAGE (it must
be one of the links defined in the 10 links above). If specified
then when the task arrives at the stage the default stage
specified is preloaded on the activity workbench task. If then
user updates the completed flag then the next stage is already
selected. They can also use the complete task browse action and
the default link will be selected. This allows the most common
link to be defaulted and eases the effort required by the user.
The default link is shown on the diagram in green and with an
asterisk after the link label and can be changed by double
clicking the link and selecting the default link checkbox
Activity
The activity type will be the type of action created on the
Type
Activity Workbench (determined by local configuration).
Priority
Priority will be high, normal or low.
Function
The function should be a valid COINS function which will
be displayed as a link from the Activity Workbench. The
function can be left blank if the action is to be performed
outside of COINS or a suitable link is not available. The
user will manually need to find and perform the task and
then complete the stage in COINS.
Workflow
Whether an email should be sent to the user of this stage
Email
to complete the action. This will only occur if the user has
also been configured to request emails for this workflow.
Text
The text of the email that will be sent for this stage of the
workflow.
31-May-2017 Construction Industry Solutions
Page 419 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Duration
Whether this stage has a duration associated with it. If the
stage has a duration, the entry on the Activity
Workbench will turn red if the stage is overdue. Ticking
this will allow the following to be defined:
The duration of the stage (in the units shown in the next
field).
The units for the duration of the stage.
When the duration is calculated from:
Absolute = From the start of the workflow.
Relative = From the start of this stage.
Monitor
The person whom COINS should notify if the stage is
overdue. If the stage is overdue, COINS creates a
duplicate action on the monitor's workbench, as an
escalation type activity.
Associated Parameters - SY/WFESC
The activity workbench activity type to create if a
workflow is escalated to the workflow monitor. You can
configure different activity types for the activity
workbench so that these escalation tasks stand out.
Reminder
Whether to generate an Outlook reminder for the task. If
you are using Outlook integration, this will generate an
Outlook reminder for the user.
31-May-2017 Construction Industry Solutions
Page 420 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Timeout
If ticked the following will be displayed:
The default stage label to move to if the timeout is
exceeded.
If left blank then the next sequential stage will be used.
Below is an example of a stage in PL Invoice Approval where, once the invoice has
been reviewed by one role, the next stage available will be determined by the value
of the invoice on the invoice.
31-May-2017 Construction Industry Solutions
Page 421 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 422 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.2.9 WF Stages - Task
A task is similar to a Stage except that the workflow will not wait for a task to be
completed before moving onto the next stage – it will simply assign the task to the
appropriate role and move to the next linked stage.
Field
Description
Role Calculation
A calculation to determine the user (or users) who must action
this stage; used as an alternative to the Role. This calculation
must result in one or more user names. If the role above is
specified, the calculation variable “this” is assigned as the result
of the role assignment. This can then be further manipulated by
this calculation as required.
31-May-2017 Construction Industry Solutions
Page 423 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Check
Calculation
Result for
Delegation
If a workflow stage uses a role calculation, instead of an assigned
Role, delegation will not automatically kick-in - so if they are
away the calculated role will always apply. You can now set it to
check for delegation by ticking this field
Select User
If the Role or Role Calculation results in a list of users, this
determines how COINS treats the list.
Role - Whatever the result of the Role or Role Calculation fields
is, use that. If the result is two or more users, the task will
appear on each user's workbench, but only one of them has to
action the task.
Individual - If the result is a list, the user who is handing on the
task must first select one individual from the list to be the
person to action the task.
Group - The person who is handing on the task may select an
individual, or assign it to everyone in the list.
Pre Calculation
Calculation to be performed before the stage. For example, you
could use this to throw an error if a certain condition hasn't been
met before the stage is run.
Post Calculation
Calculation to be performed after the stage. For example, you
could use this to send an email when the stage has been
completed.
Next
The label of another stage to which this stage is linked.
Activity Type
The activity type will be the type of action created on the
Activity Workbench (determined by local configuration).
Priority
Priority will be high, normal or low.
Function
The function should be a valid COINS function which will be
displayed as a link from the Activity Workbench. The function
can be left blank if the action is to be performed outside of
COINS or a suitable link is not available. The user will manually
need to find and perform the task and then complete the stage in
COINS.
31-May-2017 Construction Industry Solutions
Page 424 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
Duration
Whether this stage has a duration associated with it. If the stage
has a duration, the entry on the Activity Workbench will turn
red if the stage is overdue. Ticking this will allow the following
to be defined: The duration of the stage (in the units shown in
the next field).
The units for the duration of the stage.
When the duration is calculated from:
Absolute = From the start of the workflow.
Relative = From the start of this stage.
Monitor
The person whom COINS should notify if the stage is
overdue. If the stage is overdue, COINS creates a
duplicate action on the monitor's workbench, as an
escalation type activity.
Associated Parameters - SY/WFESC
The activity workbench activity type to create if a
workflow is escalated to the workflow monitor. You can
configure different activity types for the activity
workbench so that these escalation tasks stand out.
Reminder
Whether to generate an Outlook reminder for the task. If
you are using Outlook integration, this will generate an
Outlook reminder for the user.
31-May-2017 Construction Industry Solutions
Page 425 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.3 WF Template - Diagram Tab
The diagram tab shows and allows maintenance of the workflow diagram.
If stages already exist then the stages will be spaced out linearly on the page.
The stages can then be dragged to a desired location on the page. The links between
the stages are shown and will move with the stages. Each time the stage is “dropped”
the location is saved back to the server. When you next visit the diagram tab the
stages will be placed in the position that they were last left.
31-May-2017 Construction Industry Solutions
Page 426 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The toolbar controls the diagram.
The % combo controls the zoom level and is retained for the page (similar to browse
filters). If a new % is selected the diagram is redrawn at that scale.
31-May-2017 Construction Industry Solutions
Page 427 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The refresh button reloads the page. This refreshes all the data from the server and
rebuilds and redraws the diagram.
The save restore point button ( takes a snapshot of the workflow template and saves
a copy that can be re-instated if required. This allows the user to save the state of
the template. 50 back versions will be retained.
The restore button ( allows the user to select one of the 50 restore points and to reinstate as the current version.
Select the plus icon next to the restore point. Selecting a restore point to restore will
cause a new restore to be taken (Type=System – just in case you need to get back to
the previous position) and then the template and stages are restored.
This restores the details on the workflow header e.g. initialization calculations, document,
etc.
31-May-2017 Construction Industry Solutions
Page 428 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The full screen button will show the diagram in a new browser window which can be
maximized to give the full amount of space for editing.
The remaining buttons on the toolbar are for adding new stages of each of the types
Appointment, Delay, Fork, Merge, Process, SMS, Stage, Sub Workflow, and Task.
They will show an appropriate dialog to add the stage details.
31-May-2017 Construction Industry Solutions
Page 429 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If you OK the dialog (and there are no errors) then a stage will be created just under
the toolbar for you drag on to the diagram canvas.
You can double click a stage to update the details on that stage.
31-May-2017 Construction Industry Solutions
Page 430 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Deleting a stage will cause it to be deleted from the diagram and any links to and
from it automatically removed.
You can double click a stage link and a link dialog will be displayed
The label is shown by the link on the diagram.
Selecting the delete option will remove the link between the two stages.
You can double click a next link and the next dialog will be shown. This allows you to
remove the link by selecting the delete option.
31-May-2017 Construction Industry Solutions
Page 431 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
You can drag the cursor from the square in the stage to another stage to create a link
between the stages.
As you have over valid drop zones they will be highlighted
Dropping the link on the stage causes the stage to be created
All the changes described above are written back to the workflow template as each
change is made. There is no need to save the template. The restore point feature
allows you to restore to specific stable versions if required.
A timeout link can be specified on stages on the Time tab by referring to the label of
the target stage.
31-May-2017 Construction Industry Solutions
Page 432 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
They are then shown as a red arrow on the diagram and labelled Timeout.
They cannot be deleted by double clicking but only by blanking out the timeout stage
on the Time tab.
The meaning and use of the fields for each of the stage types is the same as
previously used on the Stages tab. The stage link labels are new and are simply a
description of the link to be shown on the diagram.
Any stage that is left without a stage link or next link is automatically set as an End
stage. End stages are shown with a red flash in the bottom right hand corner.
The first stage added on the diagram is automatically set as the start stage and shown
with a red flash in the top left hand corner. If you wish to change the start stage then
you can either re-sequence the stage on the Stages tab so that it is the first stage
sequentially or select the Start checkbox on the Advanced tab. This will
automatically switch the stage to the first in sequence.
31-May-2017 Construction Industry Solutions
Page 433 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If you switch tabs you may need to refresh the tab data from the server to take in to
account changes made on other tabs.
31-May-2017 Construction Industry Solutions
Page 434 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.4 WF Template - Check Tab
This tab will provide a quick review of some specific problems which will help to
debug the workflow. In the example shown below it is informing us that a stage has
no links to other stages but has not been defined as an end stage. These types of
errors causes the workflow to fail.
Once the errors have been addressed, regenerate the information on this tab by
clicking
The Id has been added to the stages tab to allow easy identification as to where the
errors have been identified.
31-May-2017 Construction Industry Solutions
Page 435 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.5 WF Template - Paths Tab
This tab depicts a pictorial view of the workflow. For example:
31-May-2017 Construction Industry Solutions
Page 436 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.6 WF Template - Active Tab
Field
Description
Task
The internal task number of the workflow instance. This field
links to the Workflow Summary
Workflow
Workflow template code
Description
The workflow template description
Created
The date the instance was created
By
Who created the workflow instance
Status
The status of the workflow instance
Last update
The date/time of the workflow instance
By
The COINS userID of the user.
31-May-2017 Construction Industry Solutions
Page 437 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.7 WF Template - Complete Tab
Workflow Complete Tasks shows you the inactive (completed) tasks for the workflow
template
Field
Description
Task
The internal task number of the workflow instance. This field links to
the Workflow Summary
Workflow
Workflow template code
Description The workflow template description
Created
The date the instance was created
By
Who created the workflow instance
Status
The status of the workflow instance
Finished
The date/time the workflow instance completed
31-May-2017 Construction Industry Solutions
Page 438 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.9.8 WF Template - Outstanding Tab
The “Outstanding” shows all outstanding actions on all stages for a workflow.
A link is shown to take you to the task summary (in a new window).
If you select an entry and navigate to the bottom of the screen there is an action that
allows you to force the stage to complete and move to another in the workflow.
31-May-2017 Construction Industry Solutions
Page 439 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
This typically will be used to complete a workflow when events have moved on and
the task is no longer required. In order for this to work effectively, it is good design
practice to ensure you have an END stage with no processing associated with it that
can be selected when forcing a stage.
31-May-2017 Construction Industry Solutions
Page 440 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.10 Workflow Deployment to Companies
It is possible to copy a workflow template from one company to one or more
companies in a single process.
The user can select the workflow or workflows to deploy on the workflow template
screen.
You can then select the company group (which defines a group of companies) that the
template should be copied to.
The system will check that the workflows can be copied to all companies in the
company group. The current company (from which the template is being copied) is
excluded.
The copy will be prevented (to all companies) if:
l
The workflow exists in any company and is status of live
l
The workflow exists in any company and there are tasks for it
If all companies in the group pass this criteria then the template from the current
company will be copied to all the companies overwriting (delete and create) any
versions in the target company that are in status edit.
31-May-2017 Construction Industry Solutions
Page 441 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 442 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.11 Workflow Monitor
A Monitor is the user who COINS should alert with a duplicate task if a stage extends
beyond the expected duration. If a stage is overdue, COINS creates a duplicate action
on the monitor's workbench with an escalation type activity.
The escalation type activity is defined in the System Parameter WFESC
NOTE - This MUST be a different action type to that being used within the Workflow
stages to allow for appropriate escalation and completion of tasks.
It is possible to assign a Monitor to a workflow as a whole or to individual stages. The
monitor specified on the template will be used unless there is a specific monitor
specified on the stage itself.
To use the monitor a duration will need to be specified against the stage:
Duration Whether this stage has a duration associated with it. If the stage has a
duration, the entry on the Activity Workbench will turn red if the stage is overdue.
The duration of the stage (in the units shown in the next field).
The units for the duration of the stage.
31-May-2017 Construction Industry Solutions
Page 443 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
When the duration is calculated from:
Absolute = From the start of the workflow.
Relative = From the start of this stage.
The monitor can then be selected from the list of Roles.
There is a background process (syu9999.p – Background Monitor) which will need to
be run against the COINS database so that as Stages become overdue the appropriate
monitor can be applied. These processes will also be required by any Delay stages to
ensure that once the delay has elapsed the workflow moves onto the next linked
stage(s).
31-May-2017 Construction Industry Solutions
Page 444 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.11.1Workflow Monitor Workbench
The Workflow Monitor Workbench allows System Administrators and other key users to
review and monitor workflow progression
There are three tabs
l
l
l
Monitor - A Summary of Live and Overdue Stages on those Workflows where the
Monitor Status has been checked.
Active- A List of all workflows that are currently active and awaiting an action to
complete.
Completed – A List of all completed workflows.
31-May-2017 Construction Industry Solutions
Page 445 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.11.1.1WF Monitor - Monitor Tab
Field
Description
Workflow
Workflow Id
Description
Name of the Workflow
Status
Indicator as to whether the Workflow is LIVE or in EDIT mode
Live Stages
The Number of Stages which are awaiting action on the Activity
Workbench
Overdue
The Number of Stages which have exceeded their monitored time
Stages
limit
Workflow Monitor diagram
The workflow monitor has a button
shown on each row to allow the status of the
workflow to be shown diagrammatically.
If you select the button then a new window/tab is launched with the diagram shown for the
chosen workflow.
31-May-2017 Construction Industry Solutions
Page 446 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The zoom and refresh options (from the maintenance screen) are available and the diagram
shows live and overdue tasks for each of the stages. They are colour coded so that live tasks
are shown green and overdue tasks shown red. No tasks are shown as zero and not coloured.
You can drill down to the live and overdue stages by following the link on the numbers
shown in the stage.
This is shown in a new window/tab. You can drill further down in the task using the existing
task enquiry.
The numbers on the workflow monitor diagram are automatically refreshed every 10
seconds. A change to a task on the activity workbench by users is automatically presented
on the monitor diagram.
31-May-2017 Construction Industry Solutions
Page 447 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.11.1.2WF Monitor - Active Tab
Field
Task
Description
The internal task number of the workflow instance.
This field links to the Workflow Summary
Workflow
Workflow template code
Description
The workflow template description
Created
The date the instance was created
By
Who created the workflow instance
Status
The status of the workflow instance
Last update
The date/time of the workflow instance
By
The COINS userID of the user.
31-May-2017 Construction Industry Solutions
Page 448 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.11.1.3WF Monitor - Completed Tab
Completed Tab
Field
Task
Description
The internal task number of the workflow instance. This field links to
the Workflow Summary
Workflow
Workflow template code
Description The workflow template description
Created
The date the instance was created
By
Who created the workflow instance
Status
The status of the workflow instance
Finished
The date/time the workflow instance completed
31-May-2017 Construction Industry Solutions
Page 449 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.12 Workflow Summary
From the Active or Completed tab, clicking on the Task number will link to the
Workflow summary screen.
Four tabs are available:
l
Task
l
Stages
l
History
l
Variables
31-May-2017 Construction Industry Solutions
Page 450 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.12.1WF Summary - Tasks Tab
Field
Task
Description
The internal task number of the workflow instance.
Description The workflow template description and the user defined task ID as
configured on the workflow template.
Created
The date and time the instance was created
By
Who created the workflow instance
Status
The status of the workflow instance
Last
The date/time that the workflow instance was last updated.
Update
By
The CONS user ID of the user
Completed The date/time the workflow instance was completed
End Stage
The label of the stage that completed the workflow
31-May-2017 Construction Industry Solutions
Page 451 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.12.2WF Summary - Stages Tab
Field
Description
Description
The description of the stage
Due
The date/time the stage is due to be completed
Timeout
The date/time this stage will timeout
User
The user that this appointment or task is for.
Date
The date for the appointment or task.
Time
Time that the action was created/due.
Complete
Whether the action has been completed
31-May-2017 Construction Industry Solutions
Page 452 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.12.3WF Summary - History Tab
Field
Description
Description The description of the stage
Started
The date/time the stage started
Due
The date/time that the stage was due to be completed (if the stage had
a duration associated with it).
Finished
Date/Time the stage finished
User
The user who completed the stage.
Notes
Any notes entered by the user on the task.
31-May-2017 Construction Industry Solutions
Page 453 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.12.4WF Summary - Variables Tab
Task Variables shows the variables that have been defined as part of the workflow. Once
defined, the variables persist during the life of the workflow and are available to each stage.
31-May-2017 Construction Industry Solutions
Page 454 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.13 Workflow User Variables
Workflow User Variables allow you to use different values for different users in
conditions and calculations. For example, a condition may rely on an authorisation
limit which is different for different users.
It is possible to define either general or user based variables for use within
Workflow.
To do this define the User ID (or leave blank for all Users), the variable code and the
variable value.
Once a role has been calculated on any stage the User Variable can be called using
the following field on the sysuser record:
sysuser. RO_sur_wfvar^{VariableCode}
31-May-2017 Construction Industry Solutions
Page 455 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.14 Workflow Parameters (System Parameters)
The following system parameters relate to using workflow.
31-May-2017 Construction Industry Solutions
Page 456 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.15 Database Triggers
Database triggers can be used to start workflows on particular records as they are created or
updated.
To use a Database Trigger define the database table name against which the trigger
should fire.
When using database triggers it is necessary for an App Server to be available on the
system.
A database Trigger will take effect whenever there is a Write to the database (ie an
update or a creation). The database Trigger is set up against the table name and then
it uses a before and after calculation to make the Trigger activate.
The Before and After values should be calculated using standard COINS calculation
syntax and the After calculation should call the standard method to start the
appropriate workflow:
Table
The table to be checked for record changes
Before
The value of a field on the record to be checked prior to the record
being amended/added
After
The value of a field on a record to be checked after the record is
amended/added
31-May-2017 Construction Industry Solutions
Page 457 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
In the example above, the table pi_project is tested for a value in pij_num for a blank.
The implication of this test is that pij_num is only blank when a record is created. No
test is made after the record is changed as the WF is intended to run for each New
record.
In the second example above, pp_organisation is checked for a value in ppo_leave_
date and the value stored in variable $old. After the record is changed, the current
value of ppo_leave_date is stored in $new and old and new variables compared. If
they are the same, nothing happens, but if the leaveing date has changed, the
workflow is triggered.
Two examples of Database Triggers:
This is a nice simple one to test the triggers are firing and the App Server is runnng if you take the test User record and set the name to 'TEST' it will error when you
save it.
Table
Before
sysuser
After
ifExec(equal (sysuser.su-name,'Test'),EQ,1 error
(1,'Name cannot be Test');
This is a simple Project Trigger to send an alert via email when the field pij_our_value
is updated.
Table
Before
After
pi_
debug
b=pi_project.pij_our_value;c=if(a,ne,b); ifMethod
project
(1);a=pi_
(c,'sysualert.sendEmail','user@companyl.com','','My
project.pij_
Project Value has Changed','Project Number - ' +
our_value;
pi_project.pij_dispno + ' ' + pi_project.pij_name_;
It also has debug switched on so you will see the calculation in the App Server Log
File (in a similar way to the Report log file). The Log file can be found in
$BASE/var/diag and is usually name something like:
31-May-2017 Construction Industry Solutions
Page 458 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
oaliveas.server.log
This can be a huge log file so I suggest testing and debugging on a non-live
environment where there are fewer users - preferably just yourself.
31-May-2017 Construction Industry Solutions
Page 459 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.16 14 Import/Export Workflow Template
All elements of the Workflow configuration can be updated using either standard
Bulk maintenance options or the import and export options.
31-May-2017 Construction Industry Solutions
Page 460 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.17 15 Launching Workflow
There is a standard method available for launching workflows from within the OA
framework using the standard calculation syntax, this is as follows :
ifexec(var,EQ,1) method('wfuwfp01.startWorkFlow','WORKFLOWCODE');
There is a standard method available for a bulk change of status to a group of records
from within the OA framework using the standard calculation syntax, this is as
follows:
Method(‘wfuwfp01.completeWorkflowForRowid’,’{xx_xxxRowid}’,’
WORKFLOWCODE’, ’Status From’,’Status To’,’Notes for history’)
Method(‘wfuwfp01.completeWorkflowForRowid’,’{ap_invoiceRowid}’,’TIM’,
’*’,’A’,’Notes for history’)
In the above example this method will update - All invoices within query for
workflow named ‘TIM’ will convert ‘all status’ to ‘status A’ and adding a Note to the
History. The activity WB task will be completed if it belongs to the person doing the
completion otherwise it will be removed.
This can be used in reports, on pages or from a database trigger, indeed anywhere
where a calculation is performed.
31-May-2017 Construction Industry Solutions
Page 461 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.18 Using a Choose Action
A workflow can be triggered from a browse screen using a linked menu and providing
a choose action option. The function called from the linked menu should be
configured as follows:
31-May-2017 Construction Industry Solutions
Page 462 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
8.19 17 Method to force the closure of Workflow:
There is a method which can be used within the context of a report or within the
Calculation editor if it is applicable for one record. The syntax for the method is as
follows:
method('wfuwfp01.completeWorkFlowForRowid','Rowid','WFName','FromStage','To
Stage','Comment');
Example of use:
method('wfuwfp01.completeWorkFlowForRowid','0x0000000000443c85','EX_
1','*','END','Forcing the Workflow to close via method calc');
31-May-2017 Construction Industry Solutions
Page 463 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9
Introduction or Executive Summary
This document describes the capability for the user to define services using existing
components of COINS.
The user is able to define the following general capabilities using OA designer:
l
Datasets – to extract data records for use on reports
l
Page Maintenance – which can include add, update and delete capabilities
l
Calculation Programs – that can run low level methods in COINS RSPs to extract and/or
manipulate data
It is now possible for the user to also define an interface that matches up to these generic
features so that they can be run as a service to be exposed on an Enterprise Service Bus
(ESB) or as a Webservice.
31-May-2017 Construction Industry Solutions
Page 464 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.1 soapUI
The examples given in this document use the Open Source tool soapUI to demonstrate the
interaction of the Web Services. It is assumed that clients working with Web Services will
have their own tools and applications, but if you wish to follow the examples directly, soapUI
can be downloaded from.:
http://www.soapui.org
31-May-2017 Construction Industry Solutions
Page 465 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.2 Licencing
If you encounter any messages regarding licencing whilst using Web Services, check the
following:
9.2.1 Additional Licencing
User Defined Services require an additional element of licencing.
In Module/Licence Maintenance, the Role %SYESB must be present
Within this, the functions %WXSYESB003/004/005 and 007 should be assigned:
31-May-2017 Construction Industry Solutions
Page 466 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Once you have checked that these are in place. Under the module/Licence Maintenance
Extras Tab, there are four entries that define which user-defined services can be used:
31-May-2017 Construction Industry Solutions
Page 467 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
X-ESBDA
X-ESBPA
X-ESBPR
X-ESBTABLES
controls how many datasets can be created within user defined services.
controls the number of pages that can be built
controls how many user defined programs
controls how many GET-SET services may be defined.
31-May-2017 Construction Industry Solutions
Page 468 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.2.2 Roles
Web Services are licenced using Roles. These may be found within System Setup/Module
Licence Maintenance. The Users column will indicate the number of users who may call the
service – typically these will be named users.
Each role needs to be set up to give access to specific service functions
31-May-2017 Construction Industry Solutions
Page 469 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 470 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.2.3 User Maintenance
To grant access to the required service, open the User record within System/User
Maintenance and select the Groups Tab.
Tick the appropriate Roles – subject to the licensing granted to your company and click Save.
31-May-2017 Construction Industry Solutions
Page 471 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.3 Viewing Installed Services
To view the services installed on your system, take your standard environment access URL,
such as:
http://195.40.14.50/cgi-bin/oartvol11/wologin.p
and replace wologin.p (and anything after it) with wouesp.p
For example:
http://195.40.14.50/cgi-bin/oartvol11/wouesb.p
The following page should be displayed.
31-May-2017 Construction Industry Solutions
Page 472 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The contents of this page will vary, depending on the services installed on your particular
system.
Please note that this page will be displayed regardless of the licencing installed on your
system – this means that although you will be able to view the services, you may not be able
to run certain ones if you have not been licenced to do so.
Selecting a Module Service, for example JC – Contract Status, will display the services for
that module:
31-May-2017 Construction Industry Solutions
Page 473 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If you then drill down into a particular service, For example JCESB008 – Company Changes,
you will be taken into a page detailing the schema, field definitions and sample messages for
the service.
31-May-2017 Construction Industry Solutions
Page 474 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If this page does not show the fields and sample messages, Web Services has not been
configured and you will need to contact COINS Support to arrange for Tech Services to
investigate
31-May-2017 Construction Industry Solutions
Page 475 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.4 Testing a Service Connection (Using soapUI)
From your browser session, using the JC – Contract Service as our example, select the
Company Changes option. In the first schema Panel, locate the WSDL entry.
Right-click on this and select Copy Shortcut.
Launch the soapUI application.
Select File/New SOAP Project.
31-May-2017 Construction Industry Solutions
Page 476 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Paste the shortcut contents into the Initial WSDL: field. Change the Project Name to
something more meaningful.
Click OK.
31-May-2017 Construction Industry Solutions
Page 477 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The application will examine the contents of the XML file from the shortcut and will build the
necessary interactions.
If successful, the navigator panel should display a result similar to that shown here.
Double click on Request 1 to process the XML and build the appropriate message format.
The message details (shown below left) are the same as those generated as Sample Output in
the Services Browse (shown below right). The only difference is the version in the soapUI is
more verbose with details such as optional fields indicated.
31-May-2017 Construction Industry Solutions
Page 478 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 479 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
To submit the request message, click the green arrow to the left of the toolbar
31-May-2017 Construction Industry Solutions
Page 480 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The message will be sent to the server and the server will issue an appropriate response –
shown in the right hand panel.
Since we sent an empty message in the first instance, the request will fail as shown below:
The exception has been generated because the COINS server expects to be told which
server and which environment the message is intended for. A request sent to the wrong
server will fail. This is a protection measure to ensure that you do not issue requests to a
LIVE environment during testing, or to a TEST environment when you go LIVE.
31-May-2017 Construction Industry Solutions
Page 481 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
In our message, therefore, we need to fill in the destination details:
Once you have made the changes, send the message again.
This time the request should go further, but will fail again due to invalid username/password.
31-May-2017 Construction Industry Solutions
Page 482 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Once again, this is a security measure and needs to be specified within the request.
31-May-2017 Construction Industry Solutions
Page 483 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Whilst we are making some more changes, we can remove the lines for Group, extUser and
extAuth as these are not generally used.
Send the request again, and this time you should get a RESPONSE message instead of an
EXCEPTION.
31-May-2017 Construction Industry Solutions
Page 484 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
This indicates that we now have a correct message format.
However, whilst we got a response, the response came back with no data. This is because
the service we are using as an example requests details of changes made to COINS company
records since a certain date. So we need to add one more change to our request and specify,
in the Body entry, which company and from which date. For example:
Sending the request again now returns another RESPONSE request and some data.
31-May-2017 Construction Industry Solutions
Page 485 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
We have now proved that:
l
the Services are working
l
we can configure the messages appropriately
l
we can call them and get a response
Having established these points, we can confidently move onto other aspects of using the
services knowing that we have a properly configured and working system.
31-May-2017 Construction Industry Solutions
Page 486 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.5 ESB COINS User
In the previous section, we had to specify a User and Password in the message in order to
obtain a correct response.
Depending on your requirements, you may wish to have a single user account dedicated to
running services. To configure this, Navigate to System/System Setup/System Parameters.
Parameter ESBUID allows you to specify a user id (licenced to use Web Services) that will
be used to run a service if no other userid and password are specified. Whilst we have used
it in our example, it is recommended that you do NOT use sysadmin as the userid but instead
set up an account dedicated for running web services.
In our previous example, if we now remove the section, containing our original
username and password, from our message….
31-May-2017 Construction Industry Solutions
Page 487 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
….and resubmit the request, the RESPONSE message is returned with the account from the
system parameter returned as the authenticated user.
31-May-2017 Construction Industry Solutions
Page 488 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6 User Defined Services
Where a COINS Webservice does not exist that meets your requirements, User Defined
Services, as their name implies, allow Web Services to be configured to access data to your
specification.
User defined services come in several forms:
l
Data Sets – These allow you full control of the information being retrieved from COINS
l
Pages – Simple maintenance of data within COINS, such as hold codes on invoices.
l
l
Programs – Calculation programs, such as those used in Workflow, which can be run from
Web Services
GET/SET – A service which allows you to GET information from any table and SET
information in any table (subject to system security and Business Logic rules).
31-May-2017 Construction Industry Solutions
Page 489 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.1 Datasets
Three components are required for Datasets. A function, a page and the dataset itself.
It is important that all three components are defined with the same name.
In this example, we will use the name NLWSEX1 and we will create a dataset that will
retrieve specified Supplier Records from the Supplier Master File.
9.6.1.1 Function
Create the function called NLWSEX1 with Category of SER – Service and Program of
syesb003. The Context of the function will determine the description that will appear later
on the Web Service menu.
9.6.1.2 Dataset
The dataset defines the output message of the webservice.
Create a dataset called NLWSEX1 with the Query:
FOR EACH ap_vendor
WHERE ap_vendor.kco = {kco}
AND CAN-DO('{RS_avm_num__3}',ap_vendor.avm_num)
This query will allow us to specify the COINS Company and a list of required Suppliers
Accounts. These selections will be passed to the dataset by the page which we will create
later.
31-May-2017 Construction Industry Solutions
Page 490 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Click
Add the fields
kco
avm_num
avm_name
The dataset is constructed in the same way as any OA Designer dataset, so fields can be
calculated fields as well as taken directly from the COINS database.
31-May-2017 Construction Industry Solutions
Page 491 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.1.3 Page
The page design controls the fields that the web service will expect in order for it to perform
its function.
In this example we need the web service to be passed the COINS Company (kco) and the list
of required Supplier Accounts (RS_avm_num__3).
For Web Services, the Page design consists only of a Page called the same name as the
function and the Dataset, and the required fields defined on an UPDATE form.
Field names can be followed by (XX) where XX is either IN,DE,DA,CH,LO meaning Integer,
Decimal, Date, Character or Logical data type respectively. If omitted then character data
type is assumed.
31-May-2017 Construction Industry Solutions
Page 492 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The page defines the INPUT schema for the BODY section of the message.
9.6.1.4 Adding the Function to the Web services Menu
To run the Dataset Web Service, first check that the menu function UWXSYESB003 exists.
If it does not exist, then you need to create it.
Open the Function and select the Menu Items Tab. If the function already exists, there may
already be entries on this tab relating to Standard Used Defined Services issued by COINS
(prefixed with %) or other User Defined Services created by your company.
Click and enter the name of your new User Defined Services Function (in our example
NLWSEX1).
31-May-2017 Construction Industry Solutions
Page 493 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Click
. The full details of the function are displayed.
Navigate back to the COINS Services Menu and select the SY – System Hyperlink.
31-May-2017 Construction Industry Solutions
Page 494 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Locate the SYESB003 entries. You new Function will be in this group.
31-May-2017 Construction Industry Solutions
Page 495 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Select the Hyperlink to view the service schema.
31-May-2017 Construction Industry Solutions
Page 496 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The Input Schema defined by the page will look something like this:
Sample
2014-03-28T09:05:40.967+00:00
1
31-May-2017 Construction Industry Solutions
Page 497 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
1
99
And the Output Schema, defined by the Dataset will look like this:
Sample
2014-03-28T09:05:41.194+00:00
99
31-May-2017 Construction Industry Solutions
Page 498 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.1.5 Testing the Service
Create a new soapUI project and from the Service Schema, copy the WSDL shortcut link
into the Initial WSDL field
Click OK.
Once the Project has been created. Run Request 1 in the editor (Double-click the Request 1
entry)
31-May-2017 Construction Industry Solutions
Page 499 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
As before, we can use the input message as it is. However, this time we are going to replace
the input message with the one generated in the Service Schema as it is a simpler form.
Clear all the text in the left hand panel.
From the Service schema, scroll to the sample input message:
31-May-2017 Construction Industry Solutions
Page 500 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Copy the text from to and paste into the soapUI right
hand panel.
Enter the hostname, Environment and username/password detail.
Delete the lines for Group, extUser and extAuth
In the section, specify how many results are to be returned, the Company number to
retrieve the records from and a comma separated list of Supplier Account numbers to
retrieve (or * for all). For example:
Send the message. Correct any exceptions if they occur.
If all is correct, a RESPONSE message should be returned along with the requested records:
31-May-2017 Construction Industry Solutions
Page 501 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Each record contains the fields as defined by the dataset. To add additional fields, simply add
them to the dataset definition and re-run the request. The Page definition only needs to be
amended if additional selection criteria are needed in the Input message.
31-May-2017 Construction Industry Solutions
Page 502 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.2 Pages
Within COINS, pages allow the maintenance of data through Add, Update and Delete
functionality. This functionality can be replicated by Web Services.
The user-defined page maintenance webservice capability is intended to be used for straightforward maintenance of setup tables etc. where there are relatively few fields or no fields
with dependencies.
For areas such as supplier maintenance etc. there are hard-coded services for this type of
functionality.
Before embarking on designing your own page maintenance webservice it is recommended
you seek advice from COINS to check there is not already a service available that will fulfil
your needs.
For a page webservice, two design components are required, the function(s) and a page. It is
important that the function(s) and page have the same name.
In this example, we will use the name NLWSEX2 and we will design a page that will allow the
maintenance of COINS UserID’s.
9.6.2.1 Function
Create the function called NLWSEX2 with Category of SER – Service and program of
syesb004. The Context of the function will determine the description that will appear later
on the Web Services menu.
Since the table sysuser holds both groups and users, and we only want to access users for this
example, we need to set a parameter on the function to ensure we maintain the correct
records. Add the parameter su-type=no
31-May-2017 Construction Industry Solutions
Page 503 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.2.2 Page
The page controls the record access, the Input and the Output messages. These are specified
using the following forms:
Body
Update
Detail
Defines the fields that uniquely identify the record
Defines the Input Schema
Defines the output Schema
Create new page called NLWSEX2.
The body table should be set to the COINS database table that is to be maintained – in this
example the table is sysuser.
31-May-2017 Construction Industry Solutions
Page 504 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Add the forms Body, Detail and Update
31-May-2017 Construction Industry Solutions
Page 505 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Body Form
The Body Form is used to define which fields will be used to uniquely identify the record
when Adding, Updating or Deleting. For sysuser the key field is the userid (su-userid). Other
tables may have more than one field as part of the key – all should be added to ensure the
correct record is accessed.
Add field su-userid to the Body Form.
Make sure that the Add and Update fields are ticked to indicate that this is a key field.
Update Form
The update Form is used to define the Input Schema and should contain all the fields that will
be maintained by the web service.
If records will be added by the Web service it is important to include all required fields (i.e.
all fields that would be mandatory if added through a standard COINS page) as the business
logic will not allow records to be Added without these fields.
31-May-2017 Construction Industry Solutions
Page 506 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
For user records, the required fields are the User ID, the User Name and the Prime
Company and a comma separated list of Companies the user can access. Our example web
service will also maintain the Name User field. So our list of fields will be:
su-userid
su-name
sur-primeco
su-cos
su-gui
Add these fields to the Update Form.
Detail Form
The Detail Form defines the Output Schema and you may include any fields that you wish to
see as confirmation of the record maintenance.
31-May-2017 Construction Industry Solutions
Page 507 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.2.3 Adding the Function to the Web services Menu
To run the Page Web Service, first check that the menu function UWXSYESB004 exists. If it
does not exist, then you need to create it.
Open the Function and select the Menu Items Tab. If the function already exists, there may
already be entries on this tab relating to Standard Used Defined Services issued by COINS
(prefixed with %) or other User Defined Services created by your company.
Click Add and enter the name of your new User Defined Services Function (in our example
NLWSEX1).
31-May-2017 Construction Industry Solutions
Page 508 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Navigate back to the COINS Services Menu and select the SY – System Hyperlink.
31-May-2017 Construction Industry Solutions
Page 509 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Locate the SYESB00 entries. You new Function will be in this group.
31-May-2017 Construction Industry Solutions
Page 510 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Select the Hyperlink to view the service schema.
31-May-2017 Construction Industry Solutions
Page 511 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The Input Schema – defined by the Update form of the page will look something like this:
The Output Schema – defined by the Detail Form of the page will look something like this:
31-May-2017 Construction Industry Solutions
Page 512 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.2.4 Testing the Service
Create a new soapUI project and from the Service Schema copy the WSDL shortcut link and
paste this into the Initial WSDL field
Click OK
Once the project has been created, run Request 1 in the editor. Replace the Input message
with the simplified one from the Input Schema from the Web service.
31-May-2017 Construction Industry Solutions
Page 513 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Enter the hostname, Environment and username/password details.
Delete the lines for Group, extUser and extAuth
In the Section you will notice a new line
This “Row” record must contain a valid rsp_action of one of the following:
A
U
D
Add
Update
Delete
The id field can contain an id record that will be useful for identifying issues when updating
more than one record. We will use this later in the exercise.
Specify an rsp_action of A and then fill in the appropriate user details into the remaining
Body Fields.
For example:
31-May-2017 Construction Industry Solutions
Page 514 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Send the message and correct any exceptions if they occur.
If all is correct, a RESPONSE message should be returned.
However, if we check the User records in User Maintenance, no new User has been
created.
If we look at the Input Message again, at the top of the message is another new line:
31-May-2017 Construction Industry Solutions
Page 515 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If this is set to “true”, the details will be sent and validated but no record maintenance will
take place. This allows us to test the message without affecting any data. Only when this is
set to “false” will record maintenance take effect.
Set this to false and send the message again.
This time, when we check user maintenance, we should see a new user record:
Experiment now with the rsp_actions of A, U and D to see the changes in the record and
messages that appear in the output message. Try adding a record with the same userid for
example or add a new user but leave the user name blank.
Using the ID field when adding multiple records
We can maintain more than one record at a time by duplicating the block of lines within the
Body section of the Input Message. For example:
31-May-2017 Construction Industry Solutions
Page 516 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
In the above example, in the id field of each block I have entered a unique reference for
each record.
In the message I have specified an Add of two new records, but one of the userid’s already
exists in the User records. When I then send the message one of the updates will fail. In the
output message I will get an exception:
The exception will always give the row number that failed, but with an ID specified, the ID
will also appear in the exception making it easier for me to identify the record that needs to
be amended. Only when all records in the input message are correct will any changes be
applied to the database.
31-May-2017 Construction Industry Solutions
Page 517 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.3 Calculation Programs
COINS provides the functionality for user-defined programs to be created and called by
Web services offering greater flexibility for data manipulation and retrieval.
9.6.3.1 Defining the Calculation
Calculation Programs may be defined using the Calculation Program option under OA
Reporting & BI Setups in the OA Reporting & BI Module.
To create a new program, click
31-May-2017 Construction Industry Solutions
Page 518 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Program
This is the name by which the calculation will be referenced. It is
recommended that this name is meaningful enough for its purpose to be easily
inferred when debugging in the future.
Description Give a brief description of the purpose of the calculation here.
The next box is for the calculation. The calculation syntax used follows COINS OA standard
syntax, with numerical variables for the various parameters. Each numerical variable is
encased in curly braces e.g. {1}
For example, if we wanted a calculation to multiply two different numbers, we would write
this as:
{1} * {2}
Once a variable is defined, it can be re-used in a calculation and therefore need only be
passed into the calculation once.
e.g. {1} *{1} * {1}
Three examples of a calculation program definition are shown below:
31-May-2017 Construction Industry Solutions
Page 519 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The calculation code can run other user defined calculation programs in the same way as any
other calculation.
If the program is run without passing the required {} parameters then they will be replaced in
the calculation with blanks.
Variables defined before the calculation is run can be accessed. Variables defined or
updated in the calculation program will be available following the call to the calculation
program.
The Notes section allows a more detailed description of the calculation to be entered.
9.6.3.2 Testing Calculation Programs (run, run$)
Once a calculation has been saved then it can be run by using:
run('calc',var1,var2) for numerical values
or
$run$('calc',var1,var2) for character values
Calculations may be tested in the Calculation editor prior to use to check they work as
expected.
31-May-2017 Construction Industry Solutions
Page 520 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Calculation programs can be defined to both use and create variables. For example:
This will store the value of {1} + {2} in a variable called result. This can then be used directly
in subsequent calculations.
The name of the Calculation program to be called may also be passed as a variable.
Examples of these are shown below:
31-May-2017 Construction Industry Solutions
Page 521 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
It is also possible to use calculation programs directly within other calculations:
31-May-2017 Construction Industry Solutions
Page 522 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.3.3 Using Calculation Programs with Web Services
For this example, we are going to setup a calculation program to modify the hold code on an
invoice. The program in this example is called NLWSEX3 and has been defined as follows:
The program will accept 5 input variables
{1}
{2}
{3}
{4}
{5}
The COINS Company
The Supplier Number of the Invoice
The Invoice Number
The Hold flag (yes or no)
The hold code
The calculation will look up the appropriate invoice, set the hold flag and code, and return
two variables which will be used in the output message as confirmation of the changes.
Create the Function
Create the function called NLWSEX3 with Category of SER – Service and program of
syesb005. The Context of the function will determine the description that will appear later
on the Web Services menu.
Add the parameter program=NLWSEX3
31-May-2017 Construction Industry Solutions
Page 523 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The program parameter allows you to specify the name of the calculation program to be
used. Whilst it is not necessary to call the Calculation Programs the same name as the
functions etc. it is probably less confusing if you do keep all the names consistent. The page
and the function MUST have the same name.
Create the Page
The Page will have two Forms. The Update Form will define the Input Message
31-May-2017 Construction Industry Solutions
Page 524 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The fields will relate to the input parameters in the calculation program and should be
defined in the sequence they are used {1}=kco, {2}=avm_num etc…
The Detail Form defines the Output message and will return the variables set by the
Calculation Program.
31-May-2017 Construction Industry Solutions
Page 525 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Adding the Function to the Web services Menu
To run the Page Web Service, first check that the menu function UWXSYESB005 exists. If it
does not exist, then you need to create it.
Open the Function and select the Menu Items Tab. If the function already exists, there may
already be entries on this tab relating to Standard Used Defined Services issued by COINS
(prefixed with %) or other User Defined Services created by your company.
Click and enter the name of your new User Defined Services Function (in our example
NLWSEX3).
31-May-2017 Construction Industry Solutions
Page 526 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Navigate back to the COINS Services Menu and select the SY – System Hyperlink.
31-May-2017 Construction Industry Solutions
Page 527 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Locate the SYESB00 entries. You new Function will be in this group.
31-May-2017 Construction Industry Solutions
Page 528 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Select the Hyperlink to view the service schema.
31-May-2017 Construction Industry Solutions
Page 529 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
The Input Schema – defined by the Update form of the page will look something like this:
The Output Schema – defined by the Detail Form of the page will look something like this:
31-May-2017 Construction Industry Solutions
Page 530 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.3.4 Testing the Service
Create a new soapUI project and from the Service Schema copy the WSDL shortcut link and
paste this into the Initial WSDL field
Click OK
Once the project has been created, run Request 1 in the editor. Replace the Input message
with the simplified one from the Input Schema from the Web service.
31-May-2017 Construction Industry Solutions
Page 531 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Enter the hostname, Environment and username/password details.
Delete the lines for Group, extUser and extAuth
Fill in the appropriate Company, Supplier, Invoice and Hold code details for a suitable test
invoice. For example:
31-May-2017 Construction Industry Solutions
Page 532 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Send the message and correct any exceptions if they occur.
If all is correct, a RESPONSE message should be returned.
Once you are happy with the response, you can set the testMsg to “false” to apply the change
to the database.
Check the invoice in COINS to verify the changes are taking place as expected.
31-May-2017 Construction Industry Solutions
Page 533 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
9.6.4 Get/Set
Unlike the previous services, Get/Set services do not require functions or pages to be set up
as their operation is pre-defined. As suggested by the name, the purpose of a Get/Set
service is to retrieve a specific record and set values within it. Get/Set cannot be used to
add records, only retrieve/amend existing ones.
From the COINS Services Menu, select the SY – System hyperlink.
Locate the SYESB007 – Field Get/Set entry
Select the hyperlink to view the service schema.
31-May-2017 Construction Industry Solutions
Page 534 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Create a new soapUI project and, from the service schema, copy the WSDL shortcut link into
the initial WSDL field.
Click OK
Once the project has been created, run Request1 in the editor.
Replace the Input message in the editor with the simplified version from the Input Message
Schema
31-May-2017 Construction Industry Solutions
Page 535 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Enter the hostname, Environment and username/password detail.
Delete the lines for Group, extUser and extAuth
In the Body section of the Input Message, the first entries are:
31-May-2017 Construction Industry Solutions
Page 536 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
These allow you to specify the table the record will come from and the fields that will be
returned in the Output Message. The get statement is a comma separated list of fields.
The next lines relate to the criteria which will identify the record to be retrieved. The
entries require the name of the key field and the value to be used to identify the record.
If there is more than one key field which identifies a record, you will need to copy the
Criteria block for each required field. For example, for a table with two key fields:
Finally, the Set block of lines allow you to specify the field to be changed and the value to
which is should be set.
As with the Criteria block, if more than one field is to be changed, there should be a block of
set lines for each field.
In the following example, a supplier record in the ap_vendor table will be retrieved and the
remarks field in the supplier record will be updated.
31-May-2017 Construction Industry Solutions
Page 537 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Sending this message should produce the following return with the Output message showing
the three fields we requested in the get entry of the Input Message.
Remember that leaving the Test Message entry set to “true” will process the messages but
will not apply the changes to the database. The test message must be set to “false” for
database changes to occur.
31-May-2017 Construction Industry Solutions
Page 538 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If the database change is successful our example will have the following effect on the
supplier record:
31-May-2017 Construction Industry Solutions
Page 539 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10 Building COINS Desktops - Overview
This guide is intended for anyone with OA Designer skills to create and maintain COINS
Desktops.
This guide is not intended for end-users for which Desktop Wizards are available to build
desktops from pre-defined components. End User documentation is available from the OA
Navigation section of the COINS Learning Resources on the COINS Client Area:
(www.coins-global.com)
The guide will work through the creation of an example Desktop. It covers the creation of
the Desktop structure and explorers the configuration of the various Tile types that are
available.
31-May-2017 Construction Industry Solutions
Page 540 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1 Desktop Structure
To configure a user’s desktop, set up a new three-level menu function.
l
l
l
l
The first level is the desktop itself. This is the function specified on the user
record(
The second level must contain one or more menus which correspond to the
tabs on the desktop.
Each of these “tab” menus must contain one or more menu functions with a
new type: Section. These correspond to the collapsible sections on the
desktop. If a tab has only one section, the section is displayed without a title.
The menu items on the section menu correspond to the tiles. Desktop Menu
Item Maintenance allows you to configure which function the tile runs, how
the function opens, and what the tile looks like.
If the user configures their own desktop, COINS automatically creates functions with the
following naming convention:
Tabs – the function code of the desktop menu + T + n (where n is the number of the tab).
Sections – the function code of the tab + S + n (where n is the number of the section on the
tab)
.
Desktop Menu for User JSMITH
31-May-2017 Construction Industry Solutions
Page 541 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Function
Explanation
JSMITH
Desktop Menu
JSMITHT1
First Tab
JSMITHT2
Second Tab
JSMTIHT2S1
First Section on Second Tab
JSMITHT2S1
Second Section on Second Tab
%WPOxxxxxxx
%WPLxxxxxxx
%WSCxxxxxxx
Functions on Section
%WJCxxxxxxx
31-May-2017 Construction Industry Solutions
Page 542 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.1Creating the Functions (Manually)
A desktop wizard is available to automate much of this work, however to ensure a good
understanding of how the desktop works, we will build it manually so that we can explore
each of the components.
For our example, we are going to create a Desktop called SYALPHA with two Tabs and two
sections on each tab
10.1.1.1Desktop Functions
First we need to create the Top Level Desktop Function.
Ensure that the module is SY-System and the Category is MEN-Menu.
Click Save
10.1.1.2Desktop Tab Functions
l
l
Next we can create the two Tabs. We will have two Tabs, one called System and the
other called Modules
Copy the Top Level Function and add T1 to the function name for the first tab, and add
T2 to the name of the second function for the second tab.
l
Change the Type to Desktop Tab
l
Change the Description and Context fields to System and Modules respectively.
31-May-2017 Construction Industry Solutions
Page 543 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Now we need to add our tabs to the top level.
l
Click on the hyper link for function SYALPHA and click on the menu items tab.
l
Add the functions SYALPHAT1 and SYALPHAT2 to the list.
We can now test the initial design
10.1.2Add the Desktop to a user profile
The desktop needs to be configured for each user that will use it. Different users can use the
same desktop, or each user can have their own desktop. Configuring the desktop involves
setting up a menu and specifying the menu on the user record.
31-May-2017 Construction Industry Solutions
Page 544 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
In System > User Maintenance> Users select a user (or create a new account for test
purposes) and select the User Preferences tab.
Field
Desktop
Description
Allows the system administrator to specify the menu function that displays
the desktop for this user If the menu function does not already exist, COINS
creates a new function; this in effect creates an empty Desktop, which
either the system administrator or the user can configure.
For our example, enter SYALPHA as the desktop name.
If this is left blank, the user has no Desktop set up, and the Set Homepage
button is available to allow the user to select a single function as their
homepage.
Desktop Image
Allows the system administrator to specify the background image for this
user’s desktop. This is a drop-down list of the available image files.
Standard images are available, and administrators can upload additional
ones (see later).
Choose an existing image for your desktop.
Login as your test user. The desktop should be displayed on login
31-May-2017 Construction Industry Solutions
Page 545 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Field
Description
.
If a Desktop has been set up for a user, but they have a user home page set, when they log in
they will see the home page (but will still be able to access the Desktop). If you clear the
home page from their user record, they will see the Desktop when they log in.
31-May-2017 Construction Industry Solutions
Page 546 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.3Desktop Section Functions
Currently we only have the desktop and two tabs. Now we can look at creating the sections.
In Function Maintenance, create two new functions SYAPLHAT1S1 and SYAPLHAT1S2
For both, set the Type to Desktop Section
For SYALPHAT1S1 the description and Context should be Utilities
For SYALPHAT1S2 the description and Context should be Maintenance
Add these two functions to the Menu Items Tab of SYALPHAT1
31-May-2017 Construction Industry Solutions
Page 547 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Test the design for your test user.
Repeat the steps above to create sections for the Second Tab (SYALPHAT2S1 and
SYALPHAS2T2)
For SYALPHAT2S1 the description and Context should be Purchase Ledger
For SYALPHAT2S2 the description and Context should be Procurement
Test your design
31-May-2017 Construction Industry Solutions
Page 548 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 549 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.4Uploading Desktop Images
Two new functions allow the system administrator to upload images used on the desktop.
l
System > System Setup > Background Images allows you to load images that
can be used as the desktop background. Individual users can then select one
of these to use on their desktop.
Background Images – Put File Tab
The file name you give to the file is used in the Background Image selection list in User
Maintenance. The images are saved in the $BASE/custimage/bg/ directory. Some standard
images are provided in the $BASE/images/bg/ directory; you can copy these or upload them
using Background Images.
31-May-2017 Construction Industry Solutions
Page 550 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
l
System > System Setup > User Images allows you to load the images that are
used as the account picture on each user’s desktop. The image files must be
JPG format files, and should be approximately 60px square. (You can use
larger images but the browser will resize them, which does not always
produce good results.) You must name the files
.jpg (for example, for a user whose user ID is JSMITH, the file would be jsmith.jpg.
The images are saved in the $BASE/custimage/sysuser/ directory.
If there is no file for a user, the account image will be the image from the user’s COINS HR
record if one exists, otherwise it will be a silhouette image.
Account Image Silhouette
31-May-2017 Construction Industry Solutions
Page 551 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.5Tile Rows and Columns
On tile maintenance it is now possible to group tiles into rows or columns, by assigning codes
to tiles.
The Row code allows row breaks to be inserted. If a row code changes from one item to the
next then a new row is started. (This can already be achieved by inserting a blank function to
cause a new row to start but this is introduced to provide equivalent of the column code; see
below.)
31-May-2017 Construction Industry Solutions
Page 552 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.5.1Desktop – Tile Rows
In the example above a new row will start for User Maintenance (A), Group Maintenance
(Blank) and Maintain User Views (B).
It is also possible to group tiles in to columns.
Where a set of tiles shares a common Column code then they are set out in a single column.
31-May-2017 Construction Industry Solutions
Page 553 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.5.2Desktop – Tile Columns
In the example above, Current Users and Module Licence Enquiry share the same column
code, “A”, so are grouped in a single column on the desktop. Columns are only grouped for
non-blank column codes.
31-May-2017 Construction Industry Solutions
Page 554 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.6Add the Desktop to a user profile
The desktop needs to be configured for each user that will use it. Different users can use the
same desktop, or each user can have their own desktop. Configuring the desktop involves
setting up a menu and specifying the menu on the user record.
In System > User Maintenance> Users select a user (or create a new account for test
purposes) and select the User Preferences tab.
Fi
el Description
d
D Allows the system administrator to specify the menu function that displays the desktop
es for this user If the menu function does not already exist, COINS creates a new function;
kt
this in effect creates an empty Desktop, which either the system administrator or the
o
p user can configure.
For our example, enter SYALPHA as the desktop name.
If this is left blank, the user has no Desktop set up, and the Set Homepage button is
available to allow the user to select a single function as their homepage.
D Allows the system administrator to specify the background image for this user’s desktop.
es This is a drop-down list of the available image files. Standard images are available, and
kt
administrators can upload additional ones (see later).
o
p
Choose an existing image for your desktop.
I
m
Login as your test user. The desktop should be displayed on login
ag
e
31-May-2017 Construction Industry Solutions
Page 555 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
Fi
el Description
d
31-May-2017 Construction Industry Solutions
Page 556 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
If a Desktop has been set up for a user, but they have a user home page set, when they log in
they will see the home page (but will still be able to access the Desktop). If you clear the
home page from their user record, they will see the Desktop when they log in.
31-May-2017 Construction Industry Solutions
Page 557 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.7Alternative Desktops
You can setup more than one desktop (which you can think of as roles of the user or
personas of the user) the user then can select from the available desktops switching their
role/persona. The tabs, sections and items on the desktop refresh based on the latest
selected role/persona.
10.1.7.1User Maintenance
A new option is introduced on the user maintenance page
The alternative desktops is a list of desktops that will already exist that the user can switch
to. The currently selected desktop is shown in the existing desktop field. This is the one that
the user will see if they login (or refresh) the COINS page.
The alternative desktops are shown at the top left of the desktop above the tabs.
31-May-2017 Construction Industry Solutions
Page 558 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
As soon as you select an alternative (examples are similar but different tabs, sections and
tiles) your user record is changed so that this becomes you default desktop and the page is
refreshed showing you the new desktop.
31-May-2017 Construction Industry Solutions
Page 559 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
10.1.8Desktop Import/Export
Desktops can be maintained in COINS and are retained as functions, menus and menu items.
It is possible to copy the functions, menus and menu items using standard function export and
import features. From 11.04 new functionality makes the export and import of desktops
between users and/or between environments easier.
10.1.8.1User Maintenance
Two new buttons have been added to user maintenance. A desktop export and a desktop
import button alongside the Desktop field on the summary page.
These can be used to export the user’s desktop data (menus and menu items) to a file and
then to upload this data either to another user or to another environment.
10.1.8.2Export
Pressing the export button causes a download of the menu and menu item data for the
current user.
This finds the desktop menu (in this case TIMARM) and exports it together with all the
submenus (sections and tabs) and the items on those menus. Only menus (and contents) of
user specific menus are exported i.e. beginning TIMARM. This is to prevent any standard
menus being copied (and overwritten). It is expected that standard menus (tabs/sections)
31-May-2017 Construction Industry Solutions
Page 560 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
would be copied using existing standard techniques. The menus containing the reference to
the standard menus is exported.
The export file contains the original desktop code (TIMARM) and an export of the functions,
menus and items that make it up.
31-May-2017 Construction Industry Solutions
Page 561 of 600
COINS OA Enhancement:
COINS BI Toolset User Guide
31-May-2017 Construction Industry Solutions
Page 562 of 600
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.8.3Import
Pressing the import button brings up an upload dialog.
Selecting the export file previous downloaded will cause the desktop that was exported to be
imported as the desktop for the selected user. All the menus and functions that are
extensions of the desktop menu will be renamed for the new desktop menu.
e.g. TIMARMT1 would be renamed TIMARM2T1
TIMARMT1S1 would be renamed TIMARM2T1S1
This applies to the menus and the items (sub menus) on them.
Having imported the TIMARM desktop the TIMARM2 desktop looks the same
Construction Industry Solutions, 31 May 2017
Page 563
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
This is copy of the original and TIMARM2* functions, tabs and sections now exist.
Construction Industry Solutions, 31 May 2017
Page 564
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.9Smart Tiles
Now that the basic structure of the desktop is in place we can start to add tiles to the
sections. First of all we will add a smart tile to a standard coins function.
Smart Tiles show summary information about a function (such as financial values or the
number of items requiring attention). The values on these tiles are kept up to date and
refreshed automatically.
On the Desktop Section Function SYALPHAST1, open the Menu Items Tab and add the
function %WSYBCRR (Report Status Workbench).
This additional fields allow you to configure the tile on the section.
For each tile, you can specify the following:
Field
Description
Function
The COINS function that the tile runs.
You can leave this blank (that is, enter a line without a function) to force the
following tiles to display on a new line.
Title
The description to display on the tile. If blank, the tile shows the standard
context description.
Override
Whether to override the subtitle of the tile. If this is not ticked, the module the
function belongs to is used as the subtitle.
Subtitle
The subtitle to display on the tile. If blank (and if Override is ticked), the subtitle
is blank.
Size
The size of the tile (small, wide or normal). ‘Wide’ is intended for charts. ‘Small’
shows a compact tile; if the tile is configured to show data, labels are omitted.
Construction Industry Solutions, 31 May 2017
Page 565
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Field
Description
Open In
How to run the function: in the main area (replacing the Desktop), in a new
window (or tab, depending on the behaviour of your browser), or in a frame on
top of the Desktop.
Foreground The colour of the text on the tile. You can use the colour picker to choose a
colour, or you can enter a hexadecimal colour code directly.
If this is blank, the text is black.
Background The colour of the tile background. As with the foreground, you can use the
colour picker or enter a hexadecimal code. If this is blank, the tile background
is white.
Icon
The icon to display on the tile. If this is blank, the default icon, which is based on
the category of the function, is shown on the tile.
Options
Values
If the function has been written to allow data to be displayed on the tile, this
allows you to select which data to show.
For our first tile, enter the title of Report Status Workbench, Open In Frame and select the
values for Waiting, Generating and Unread.
Save the entry and test the Desktop.
Construction Industry Solutions, 31 May 2017
Page 566
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Where values are displayed, such as our tile above, the polling of the Tile Values (refresh) is
controlled by the same parameter that controls the User Info Messages on Report Status etc
and this param is SY/USERINFO
Construction Industry Solutions, 31 May 2017
Page 567
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.10
Info Tiles
In the previous example, we used Tiles to link to functions that allowed us to work with data
in COINS.
Another type of Tile, called an Info Tile, can be used to simply display information. This is
essentially a detail page presented as a tile.
It is important to note that Info Tiles do not automatically refresh – the data displayed will
remain static until a manual refresh of the desktop is done. For this reason, they may not be
suitable on a dashboard screen where dynamic data is required.
Create a new function called SYAPLHAINF1. For this to work correctly, it is IMPORTANT
that the Category used is INF – Information Tile and the program is set as wou005.
The description for now can be simply Information.
Save this new function, and then add it to the Menu Tab SYALPHAT1S1, setting the size to
Normal.
Construction Industry Solutions, 31 May 2017
Page 568
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Refresh the Desktop to see the result – you should now have an empty Info Tile displayed on
the Utilities section.
Now we need to define the Detail Page that will populate the tile.
By default, when a user logs into COINS, tables such as co_config, sysuser and menuparm are
already available, so for our first Info Tile we will build a simple tile that displays the details
of the logged in user.
In Page Designer, create a new Page Section also called SYALPHAINF1.
Set the Header Table as sysuser.
Click Save and add a Detail Form to the Page.
On the Fields Tab, set the Form filter to Detail and apply the filter.
Now on the Details Form add the fields su-userid and su-name
Construction Industry Solutions, 31 May 2017
Page 569
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Again, refresh the Desktop to see the changes.
All of the functionality of a standard Detail Page are available to be used on Info Tiles.
To demonstrate this we will add a layout to the data.
Create a new field on the Detail Form call LAY1, with the Label of User Details and set View
AS to Layout. In the Class, enter LAYA.
Construction Industry Solutions, 31 May 2017
Page 570
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Save the new field and then for su-userid and su-name, set the Layout field to LAY1.
Refresh the Desktop to see the changes.
Construction Industry Solutions, 31 May 2017
Page 571
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.11
Using Calculation Programs to prepare data for the Desktop
Our Info Tile was able to access information from co_config, sysuser and menuparm without
any additional work on our part.
It is possible to set up access to other tables before the desktop loads using Calculation
Programs, this will then allow the tiles access to that information..
Calculation programs are essentially pre-written standard OA Calculation syntax that can be
called on reports and browse screens. They can be as complex as required.
For example, for House Sales there is a standard Calculation program called %FINDVSI
This uses the following method to access vsi-rsp with a given kco, Development and Phase
code to return the RowID of that Development.
$method$('vsi-rsp.findKey',co_config.ro_varvalue^kco,co_config.ro_varvalue^pvJob,co_
config.ro_varvalue^pvPhase);
Note that the values are stored as kco (company number retrieved from the URL), pvJob and
pvPhase. The pv prefix indicates that these are permanent variables and once stored are
retained in the URL until removed or their value changes.
Setting the pv values allows a
specific development to be selected and any relevant Info Tiles on the next Desktop build
will then show information for that development.
Currently (Jan 2016) there are only four pv values currently available – JC job (pvJob) and
phase (pvPhase) and CI (pvView) and SRM (pvSibling).
To see how this can work, first we need to add this program to our user record.
In User Maintenance, find your userid and open the record. Select the Preferences Tab.
In the Initalise field, enter %FINDVSI
Construction Industry Solutions, 31 May 2017
Page 572
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Save the record.
For demonstration purposes we are going to borrow some functionality from the Standard
House Sales Dashboard
On the Utilities section of your Desktop add the two following Coins Standard Function as
separate entries.
%WHS5600SVSI
%WHS5600BVSI
Now refresh the Desktop.
Construction Industry Solutions, 31 May 2017
Page 573
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
On first run, the current development Tile will be blank as it does not know what information
we want. This is not good practice as in a more complex desktop, tiles that cannot retrieve
their information may cause the desktop to fail, so your desktop would normally be
configured to populate with something on first load
Click the Select Development Tile, this runs a function that allows a development to be
selected, runs the calculation program and rebuilds the desktop. Choose a development (this
guide assumes you are using a COINS training environment configured for House Sales)
The Info Tile should now change to reflect the chosen development. In the URL note that
the pv Values are shown. Any Info Tile can use those values to reflect information relating
to the selected Development. These pv Values will be retained in the URL until another
development is selected.
Construction Industry Solutions, 31 May 2017
Page 574
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.12
Desktop Tile Values
Certain Tile Values are hard-coded against a function – such as the ones we selected for our
first Tile. Typically these will be for values that are standard for any COINS user, such as the
number of report generating, the number of Uncommitted Orders, the number of users on
the system etc.
COINS functions that have been set up to display tile values have an information code
specified in the function parameters (for example: &info=cosval .reports on the Report Status
Workbench function).
For specific user requirements, it is possible to define other values which can be used on
tiles.
You can either set up additional calculations that are available to any function that uses the
same information code, or set up calculations that will be available on any tile by leaving the
information code blank.
Before writing a new Desktop Tile Value to address a specific client’s needs, consideration
should be given as to whether Development should hard code the calculation against the
function or if a bespoke Tile value is needed.
There may be performance implications – see notes (in red) below
10.1.12.1
Examples of Desktop Tile Values
Desktop Tile Values allows you to set up calculations to show information on tiles on the
COINS Desktop.
Accessing a Table Field
Construction Industry Solutions, 31 May 2017
Page 575
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Accessing a Data Mart Value
Using a Method to Write a Query to Retrieve Information
Field
Description
Construction Industry Solutions, 31 May 2017
Page 576
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Info Code
The information code to identify which function(s) to make this value
available on.
COINS functions that have been set up to display tile values already
have an information code specified in the function parameters (for
example: &info= cosval .batches). If a user-defined value has an
information code that matches the code on the function (for example,
cosval.batches), the user-defined value will be available for users to
show on the tile, in addition to the standard values.
The information code can also be FUNCTION. where
FUNCTION indicates that this value is for a single function only and
is the function code.
If the information code is blank, the user-defined value will be
available for users to show on any tile.
Info ID
The information value ID. The combination of info code and info ID
must be unique.
Description
A description of the user variable value. This is used as the label for
this value on the tile.
Configuration The configuration tables that should be positioned before the
Tables
calculation is evaluated.
co_config, sysparam and menuparm are available by default, pointing
at the correct records.
Calculation
The calculation to evaluate for the value shown on the tile.
The calculation can be any standard OA Designer Calculation syntax
as in the examples above.
Note that the values for all tiles will be updated with a frequency
that is determined by the SY/USERINFO parameter. Therefore,
although the calculations can be quite complex (using Method
Queries for example), if they take too long to run this could have an
adverse effect on performance.
Construction Industry Solutions, 31 May 2017
Page 577
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Construction Industry Solutions, 31 May 2017
Page 578
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.13
Tile Options
Desktop Tile Options allows you to set up alternative behaviour for the links on COINS
Desktop tiles (for example, to open a specific tab or a named filter). These are then available
as options that the user can select when configuring the tile.
In effect, this allows you to have the same function, multiple times, on a Desktop with each
tile displaying different information.
Construction Industry Solutions, 31 May 2017
Page 579
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Field
Description
Function
The function to which the tile option should be made available.
Option
The ID of the tile option.
Description A description of the tile option. This is used as the label for this option in the
Options drop-down list on the tile maintenance screen.
Parameters The parameters that should be passed to the link when the tile is selected.
The parameters are a string of values that are set in the URL when the tile is
selected. This may typically be :
initTab to set a tab,
initContainer to set a container tab or
NamedFilter to set the named filter on that function to be used (if available).
This is a comma separated list of the values to be used.
queryFilter to determine the filter type to use (simple or advanced)
queryColumnFilter to set the column that you are filtering on
The parameters may be used either alone or in combination with ‘&’ as the
separator (no spaces).
E.g.
&queryFilterType=simple&NamedFilter=UnCommittedOrdersOnly,MyOrders
Security
An optional security function associated with the option.
Function
Typically this would be used for tabs where the user will only be able to access
a tab if the function is available to them and the tile value should therefore also
only be available based on this function. If access is not available to the user
then the option will be suppressed.
If blank then the option will be available to all users.
Build
An optional build condition that determines whether the option is available.
Condition
Construction Industry Solutions, 31 May 2017
Page 580
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.13.1
NamedFilter Example
The NamedFilter parameter allows a Tile Option to access any existing Named Filters on a
function and to pre-populate (and apply) them with values before building the browse.
NamedFilter affects the URL, so must always be preceded by “&” when used so that it
correctly becomes a parameter in the URL.
Desktop Tile Options
%WPO101ATPHL is the Function for the Material Orders Workbench. This function has a
two sets of pre-defined Named Filters for the Types of Order (Committed, Uncommitted
etc.) and The Buyers (All or My Orders)
On my desktop I want to have three tiles, one for All Orders, one for My Committed Orders
and one for my uncommitted orders. Running the function alone should give me All orders
by default (subject to my filter recall settings). So I only need to set up two Tile Value
Options against %WPO101ATPHL.
Construction Industry Solutions, 31 May 2017
Page 581
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
For the first, the parameter will be:
&NamedFilter=CommittedOrdersOnly,MyOrders
This sets the First Named Filter to Committed Orders Only and the second filter to My
Orders.
The second function entry has a similar parameter, but sets the first filter to UnCommitted
Orders.
Desktop
On our Example Desktop %WPO101ATPHL has three separate Tiles defined.
l
l
l
For the first entry, the Title is set to All Orders and the Option is left as default.
For the second Entry the Title is set to My Committed Orders and the Option is set to My
Committed Orders.
For the third Entry the Title is My Uncommitted Orders, the Option is set to My
Uncommitted orders
Construction Industry Solutions, 31 May 2017
Page 582
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
The refreshed Desktop now looks like this:
Clicking the first tile we get all orders and all buyers
The second tile will automatically give us Committed orders, my orders
Construction Industry Solutions, 31 May 2017
Page 583
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
The final tile will automatically display Uncommitted Orders, My Orders
Construction Industry Solutions, 31 May 2017
Page 584
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.13.2
InitContainer Example
On Container Functions with multiple tabs (For example the Report Status Workbench) the
parameter InitContainer allows the tile to preselect the tab to display when the tile is
clicked.
Desktop Tile Options
The Activity Workbench (%WHS1150SHSAI) is a Container Function
It has the following tabs:
To create a Tile that will take us directly to the My New Actions Tab we can set up a
Desktop Tile Value as below:
Desktop
If we add the Activity Workbench function to our desktop, the Option field will now display
the options of Default (use the standard recall setting on my user preferences) or My New
Actions.
Construction Industry Solutions, 31 May 2017
Page 585
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Select My New Actions, save and then refresh the desktop.
Now when the Activity Workbench Tile is clicked, it will always open on the My New
Actions Tab
Construction Industry Solutions, 31 May 2017
Page 586
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.14
Tables on Tiles
Tables are scrollable tables of information that can be used anywhere, but here we
concentrate on adding them to a Tile.
In order to put a table on a tile, you need to build a browse with fields on it. This can be
directly against a database table, if you already have data or you can build a dataset to create
the data required before the chart is produced.
Tables offer the benefit of a pre-built search field, allowing any information in the tile to be
located, and (since the data is sent client side) the ability to include RO_Fields on the table
which will be sortable – something that previously required a dataset.
Construction Industry Solutions, 31 May 2017
Page 587
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.14.1
Tables : Example 1 – Direct Query against the database
In this example, we will use the table ap_vendbal to display a table of supplier period
balances
Create the Function
The function is a standard function with the exception that the Category must be TBL –
Table. Be careful not to select Category TAB – DB Table by mistake
Create the Page
The Page should use the table ap_vendbal as its body table and with an appropriate body
query to retrieve the records to be displayed. For Table Tiles DO NOT specify a number of
rows.
When creating a table tile, give consideration to the number of rows that will be returned.
Since the data is all sent client side there will be a performance issue if a tile returns too
much information across multiple desktops. A maximum of 1000 records should be
considered best practice.
Construction Industry Solutions, 31 May 2017
Page 588
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
On our body fields, we need to specify just the fields we are displaying.
For each value, you must specify an ID (this can be any unique reference for each value)
Desktop
Adding the Function to a desktop will produce the following output (Tile has been set to Full
as its size):
Construction Industry Solutions, 31 May 2017
Page 589
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.14.2
Example 2 – Using a Data Set
In this (and the next example – charts – we will use a dataset to build our data)
Create the Function
The function is a standard function with the exception that the Category must be TBL –
Table. Be careful not to select Category TAB – DB Table by mistake
In the parameters field the parameter DSgen= specifies the name of the dataset to be built
before the chart is generated.
Create the Dataset
Our example dataset will go through all the open invoices for the currently selected
company and will then create a summary of the data to be displayed.
Construction Industry Solutions, 31 May 2017
Page 590
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
In this example, the query will return a large number of invoices, which we could display, but
in this instance the Post Calculation is specified to use the Method syuds.sum to aggregate all
the returned records by Transaction type so that we have one total value for Gross for each
transaction type.
Syuds.sum requires the current temp table (OpenInvoice), a WHERE condition (if required),
the new temp table to be created (Stats), the field(s) to aggregate the data by (coj_type). The
remaining to parameter are left blank in this example.
Syuds. Calculation methods are covered in detail in the Guide LMDSY0036 – How to Create
and Use Datasets available from the Learning Resources section of the COINS Client Area on
our website (www.coins-global.com) under Business Intelligence and Analytics/OA Designer.
The data set has the following fields defined against it.
Construction Industry Solutions, 31 May 2017
Page 591
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Desktop
Adding the Function to a desktop will produce the following output:
Construction Industry Solutions, 31 May 2017
Page 592
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
10.1.15
Charts on Tiles
In order to put a chart on a tile, you need to have a set of records with an X coordinate value
and a Y coordinate value that you intend to plot.
To achieve this, you need to build a browse with fields on it. This can be directly against a
database table, if you already have data to plot or you can build a dataset to create the data
required before the chart is produced.
10.1.15.1
Dataset driven Charts
In this example, we will create a dataset to generate Supplier Statistics add the chart to a new
tile.
Create the Function
The function is a standard function with the exception that the Category must be Chart.
In the parameters field the parameter DSgen= specifies the name of the dataset to be built
before the chart is generated.
Create the Dataset
Our example dataset will go through all the open invoices for the currently selected
company and will then create a summary of the data to be displayed.
Construction Industry Solutions, 31 May 2017
Page 593
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
In this example, the query will return a large number of invoices, which we could plot, but
the graph would be very confusing. So in this instance the Post Calculation is specified to use
the Method syuds.sum to aggregate all the returned records by Transaction type so that we
have one total value for Gross for each transaction type.
Syuds.sum requires the current temp table (OpenInvoice), a WHERE condition (if required),
the new temp table to be created (Stats), the field(s) to aggregate the data by (coj_type). The
remaining to parameter are left blank in this example.
Syuds. Calculation methods are covered in detail in the Guide LMDSY0036 – How to Create
and Use Datasets available from the Learning Resources section of the COINS Client Area on
our website (www.coins-global.com) under Business Intelligence and Analytics/OA Designer.
The data set has the following fields defined against it.
Construction Industry Solutions, 31 May 2017
Page 594
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Create the Page
The Page should use the temp table ttStats as its query.
On our body fields, we need to specify just the fields we are displaying.
For each value, you must specify an ID (this can be any unique reference for each value)
Construction Industry Solutions, 31 May 2017
Page 595
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
Create the Page
The Page should use the temp table ttStats as its query.
The Gauge formatting is used in a chart page to set (via JavaScript) various graph axis and
legend formatting.
Full details of the available parameters may be found at:
http://c3js.org/reference.html
The commands used in this example are:
legend: {position:value}
Currently values bottom, right and inset are supported.
Construction Industry Solutions, 31 May 2017
Page 596
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
axis: {x: {type:value}}
Currently values timeseries, category and indexed are supported.
axis: {y: {label:text,position}}
Text values will display the text as the axis label. Null will supress any title on the specified
axis
Position values (not used in our example) are:
If it's the horizontal axis:
inner-right [default], inner-center,inner-left, outer-right, outer-center, outer-left
If it’s the vertical axis:
inner-top [default], inner-middle, inner-bottom, outer-top, outer-middle,outer-bottom
axis: {y: {tick:{count:value}}
A value entered here will set the number oy y axis ticks to show
axis: {y: {tick:{format:d3.format.(specifier)}}
Returns a new format function with the given string specifier. (Equivalent to
locale.numberFormat for the default U.S. English locale.) A format function takes a number as
the only argument, and returns a string representing the formatted number. The general form
of a specifier is:
[[fill]align][sign][symbol][0][width][,][.precision][type]
The fill can be any character other than "{" or "}". The presence of a fill character is signaled
by the character following it, which must be one of the align options.
The align can be:
("<") Forces the field to be left-aligned within the available space.
(">") Forces the field to be right-aligned within the available space. (This is the default).
("^") Forces the field to be centered within the available space.
The sign can be:
plus ("+") - a sign should be used for both positive and negative numbers.
Construction Industry Solutions, 31 May 2017
Page 597
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
minus ("-") - a sign should be used only for negative numbers. (This is the default.)
space (" ") - a leading space should be used on positive numbers, and a minus sign on negative
numbers.
The symbol can be:
currency ("$") - a currency symbol should be prefixed (or suffixed) per the locale.
base ("#") - for binary, octal, or hexadecimal output, prefix by "0b", "0o", or "0x",
respectively.
The "0" option enables zero-padding.
The width defines the minimum field width. If not specified, then the width will be
determined by the content.
The comma (",") option enables the use of a comma for a thousands separator.
The precision indicates how many digits should be displayed after the decimal point for a
value formatted with types "f" and "%", or before and after the decimal point for a value
formatted with types "g", "r" and "p".
The available type values are:
exponent ("e") - use Number.toExponential.
general ("g") - use Number.toPrecision.
fixed ("f") - use Number.toFixed.
integer ("d") - use Number.toString, but ignore any non-integer values.
rounded ("r") - round to precision significant digits, padding with zeroes where necessary in
similar fashion to fixed ("f"). If no precision is specified, falls back to general notation.
percentage ("%") - like fixed, but multiply by 100 and suffix with "%".
rounded percentage ("p") - like rounded, but multiply by 100 and suffix with "%".
binary ("b") - outputs the number in base 2.
octal ("o") - outputs the number in base 8.
Construction Industry Solutions, 31 May 2017
Page 598
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
hexadecimal ("x") - outputs the number in base 16, using lower-case letters for the digits
above 9.
hexadecimal ("X") - outputs the number in base 16, using upper-case letters for the digits
above 9.
character ("c") - converts the integer to the corresponding unicode character before printing.
SI-prefix ("s") - like rounded, but with a unit suffixed such as "9.5M" for mega, or "1.00µ" for
micro.
The type "n" is also supported as shorthand for ",g".
On our body fields, we need to specify just the fields we are plotting, and indicate which is
the X value and which is the Y value.
For each value, also specify an ID (this can be any unique reference for each value)
Construction Industry Solutions, 31 May 2017
Page 599
COINS BI Toolset User Guide
10Building COINS Desktops - Overview
In the Gauge Formatting field on the Y axis value, the value type:"bar",color:"#339933" sets
the graph type as a Bar Chart and assigns a colour hex code to the chart. It may be good
practice to assign a colour as there is a possibility of a white tile displaying a white graph –
which would appear to the user as an empty chart.
Desktop
Adding the Function to a desktop will produce the following output:
Construction Industry Solutions, 31 May 2017
Page 600
Source Exif Data: File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
PDF Version : 1.4
Linearized : No
Page Count : 600
Page Mode : UseOutlines
Language : en-gb
Producer : madbuild
Create Date : 2017:05:31 10:57:32+01:00
Modify Date : 2017:05:31 10:57:32+01:00
Title : My Document
Author : niglon
Subject :
EXIF Metadata provided by EXIF.tools
Navigation menu
Versions of this User Manual: