Difference between revisions of "Dashboard widget configuration"

From TempusServa wiki
Jump to navigation Jump to search
Line 6: Line 6:


* '''ButtonGlyph''': Icon of the button (3 options)
* '''ButtonGlyph''': Icon of the button (3 options)
** FontAwesome glyph: fa-home
** [https://fontawesome.com/v4/icons/ FontAwesome 4]: fa-home
** [https://materializecss.com/icons.html Material icons]: home
** [https://icons.getbootstrap.com/ Bootstrap Icons]: bi-house-door-fill
** Icon URL: http://starwars.com/LukeSkyWalker.png
** Icon URL: http://starwars.com/LukeSkyWalker.png
** Single character: ”P”
** Single character: ”P”

Revision as of 14:03, 14 June 2022

Configuration help

Buttons

All the below properties are required for the button

Optimally buttons are places in the Toolbar zone on the page, where they are rendered as normal buttons. If placed in other zones they are rendered as large squares.

SQL Query

An SQL Query may extract almost anyting from the database.

This process ignoreres the security restrictions in the system, so you will have to implement them yourself (see special keyworkds below).

Sample: Limited status distribution

The following example displays quite well in a pie chart.

 SELECT s.Status, count(*)
 FROM data_leads1 as d
 JOIN formstatus as s ON  s.StatusID = d.StatusID 
 WHERE d.StatusID IN (11344,11343,11345)
 GROUP BY 1

Special keywords / variables

  • %UserID%
  • %ExclusiveGroupID%
  • %GroupListSql%
  • %ExclusiveGroupListSql%
  • %AndRecordFilter%

Lists

To setup a list view, simple copy/paste the URL of a view.

Optimally you should strip anything but the parameters from the URL

?SagID=252&command=list&QUERY_FIELD_1=OPFLGNING& ...

Filtering the list

To filter the list, add three parameters to the url, pr filter. Make sure that every set of parameters have their own unique number.

?SagID=252&command=list&QUERY_FIELD_1=OPFLGNING&QUERY_PARAM_1=1&QUERY_VALUE_1=0 ...

Operators:

ID Command Note
1 = Only rows with values equal to
2 < Only rows with value lower than
3 > Only rows with values higher than
4 != Only rows with values not equal to
5 <= Only rows with value lower than or equal to
6 >= Only rows with values higher than or equal to
7 CONTAINS
8 Starts with
9 Ends with
10 IS null
11 IS NOT NULL
15 IN DAY
16 IN MONTH
17 IN YEAR
20 HAS
21 HAS NOT
22 HAS NONE
23 HAS ANY
24 IN Only rows with values equal to one of the given (comma separated list)

Special case: List of values i search parameters

Currently lists of search parameters are encoded

 ... &QUERY_VALUE_3=11344%2C11343%2C11345& ...

To make them work in list views, please decode the kommas

 ... &QUERY_VALUE_3=11344,11343,11345& ...

(just change "%2C" to ",")


Other widgets

Codeunit

This widget displays raw HTML ouput from any PageContentCodeunit.


Pro tips

Asking the right questions

To add the right content into dashboards widgets you will need to define what should be displayed

First choose either List of records (worklists) or Aggregated values (charts, tables or number)

List of records

  • Fields displayed in list ?
  • Sorting field ?

Aggregated values

  • Format ?
    • Number
    • Table
    • Chart (pie,bar)
  • Metric ?
    • Field
    • Method (sum, average, min, max)
  • Option: Categorization (group by another fields value)
  • Option: Link to detailed data

Next consider which filters limit the data

  • Period ranges ?
  • Status limitations ?
  • User relation information ?

In case you are generating normal record lists no effort is required for security filters and hiding deleted items.