P4 Software P4 Software / logisticaHQ-en

Add these docs to Claude

Ask Claude questions about these docs. Claude reads the published pages and links you back to them. Copy this address:

https://docs.p4software.cloud/mcp

In claude.ai or Claude Desktop: open Settings, then Connectors, choose Add custom connector and paste the address.

In Claude Code, run:

claude mcp add --transport http docs https://docs.p4software.cloud/mcp

Widgets

A widget is one report: a query that reads your data, and one or more ways to show its rows (a chart, a grid, tiles, a single number, a gauge). Widgets are the building blocks of dashboards: a dashboard is a board of widgets, each in its own panel. The same widget can sit on several dashboards.

Open Setup > Reporting > Widgets. Only office users can create and change widgets.

The Widgets list with its New and Actions buttons and one row per widget, with its name, description and creation date

The list

Each row is one widget, with its Name, Description and Created date. Double-click a row to open it.

ButtonWhat it does
NewAsks for a name and a description, creates the widget and opens it.
Actions > RefreshReads the list again.
Actions > DeleteRemoves the ticked widgets after you confirm. A widget still placed on a dashboard leaves an empty panel there.
Actions > ExportDownloads the ticked widgets as a file, query and presentations included, to copy them to another LogisticaHQ company.
Actions > ImportLoads widgets from an exported file.

To start from a complete set of ready-made widgets and a Warehouse performance dashboard instead, use Seed default reports on the Dashboards list.

The widget screen

The widget screen has a General tab, then one tab per presentation, then a + to add a presentation. Update saves the widget, the query and every presentation together; Refresh reads it again and drops unsaved changes.

General: the query

The General tab: Name and Description, then the SQL editor with its Read-only badge, Clear and Execute buttons, the Tables panel and the parameters, and the row count of the last Execute under it

FieldWhat it is
Name (required)The widget's name, as the dashboard designer lists it.
DescriptionWhat the widget shows.
SQL Query (required)The query whose rows the presentations show.

The query is written in LogisticaHQ's SQL editor, the same one as the Query builder and Scheduled reports: it can only read (a single SELECT, run on a read-only login, never passwords or API keys), colours SQL as you type, suggests tables after FROM and columns in the SELECT list (Ctrl+Space), and lists every table and column on the right. Click a name there to insert it at the cursor.

Execute (or Ctrl+Enter) runs the query and shows the rows under the editor in a Result card, with its own search, filters, columns and Excel export. The × on the card closes it. Look at the result before you set up a presentation: the presentations refer to its column names.

Parameters and filters

Write in the queryReplaced with, when a dashboard shows the widget
@ClientIdThe client of the person viewing the dashboard. It is empty for warehouse staff, who see every client, so filter with (@ClientId IS NULL OR p.ClientId = @ClientId) and one widget serves both.
@UtcNowThe current date and time, in UTC.
@{Label}A filter: a value typed per dashboard panel, in the panel's options. @{Warehouse} is a text box, @{Days:number} a number box, @{From:date} a date picker; the part before the colon is the label people see.

A filter's value is placed in the query as typed, so put text filters in quotes: WHERE w.WarehouseCode = '@{Warehouse}'; numbers and dates go without: WHERE DATEDIFF(day, pt.ShippedDate, GETDATE()) <= @{Days:number}. With the same widget on two panels, each panel keeps its own values, so one widget can show warehouse 1001 on one panel and 1002 on another.

Presentations

A presentation is one way of showing the query's rows. A widget can have several, for example a chart and a grid of the same numbers; each dashboard panel picks the one it shows. Click + and choose the kind:

The add-presentation list open, offering Chart, Grid, Tile, Scalar and Gauge

Each presentation gets a tab. Its arrows move it left or right among the tabs, and its × removes it. Every presentation has a Name (required), which is what the dashboard designer offers when you pick a presentation for a panel.

Chart

A chart presentation with its Chart type, Argument field, Value field and Series field

FieldWhat it is
Chart typeArea, Bar (horizontal), Column (vertical), Line or Pie.
Argument field (required)The column along the axis: dates, SKUs, operators. Type the column name exactly as the result shows it.
Value field (required)The column that gives each point or slice its size.
Value format (Pie only)How slice values are written, for example n0 for whole numbers or p1 for a percentage with one decimal.
Series fieldOptional. A column that splits the chart into one line or bar colour per value, for example one line per client.

Grid

A grid presentation with Allow export data, Page size and its list of columns

FieldWhat it is
Allow export dataGives the grid on the dashboard its toolbar: search, filters, column chooser and Export to Excel. Without it the grid shows the rows only.
Page sizeHow many rows show per page; 20 when left empty.
Grid columnsThe columns the grid shows, in order. Add adds one; the arrows move a column up or down; × removes it. List every column you want people to see.

Each column has:

FieldWhat it is
ColumnThe query column it shows.
TitleThe heading people see.
Value typeNumber, Currency, Percentage, String, Date, DateTime, Boolean or Link. It decides how values are written and sorted.
AlignmentLeft, Center or Right.
Mask (Link only)The screen the value opens, with @{Column} wherever a value of the row goes, for example pickTicketDetails/@{Id} to open the order whose Id is in the row's Id column. Write only the screen's path; LogisticaHQ adds the rest of the address.
Allow FilteringShows a filter for the column.

Tile

Tiles show each row of the query as a coloured card, which suits a short list such as one card per warehouse or per zone.

FieldWhat it is
Background Color ColumnOptional. A query column holding a colour (for example #2e7d32) that colours each tile by its own row, so the query can make late orders red and on-time ones green.
Tile Width, Tile HeightThe size of each tile, in pixels.
Grid columnsThe lines on each tile, with the same Column, Title, Value type and Alignment as a grid, plus Text Color, Background Color and Bold for each line.

Scalar

A single number in large type: the value in the first column of the first row. Write the query so it returns exactly that, for example SELECT COUNT(*) FROM PickTickets WHERE ShippedDate IS NULL. A scalar has only its Name.

Gauge

A dial or bar showing one value against a scale; like the scalar, it reads the first column of the first row.

FieldWhat it is
Gauge typeCircular (a dial) or Linear (a bar).
Orientation (Linear only)Horizontal or Vertical.
FormatHow the value is written.
Start value, End valueThe two ends of the scale.
Tick IntervalThe distance between the marks on the scale.
RangesColoured bands on the scale, each with a Start value, an End value and a Color, for example red from 0 to 80, amber to 95, green to 100. Add adds a band; × removes one.

Step by step: orders shipped per day, as a chart and a grid

  1. In Setup > Reporting > Widgets, press New, name it Orders shipped per day and press OK.
  2. On General, enter the query:
    SELECT CAST(pt.ShippedDate AS date) AS [Day],
           COUNT(*) AS [Orders]
    FROM PickTickets pt
    WHERE pt.ShippedDate >= DATEADD(day, -30, GETDATE())
      AND (@ClientId IS NULL OR pt.ClientId = @ClientId)
    GROUP BY CAST(pt.ShippedDate AS date)
    ORDER BY [Day]
  3. Press Execute and check the result has the columns Day and Orders.
  4. Click + and choose Chart. Name it Chart, set Chart type to Column, Argument field to Day and Value field to Orders.
  5. Click + and choose Grid. Name it Table and tick Allow export data.
  6. Press Update. The widget is ready to be placed on a dashboard.

Troubleshooting

What you seeWhy, and what to do
The chart is empty on the dashboardThe Argument or Value field does not match a column name of the result exactly. Press Execute and copy the name from the result's heading.
A client user sees every client's numbersThe query does not filter on @ClientId. Add (@ClientId IS NULL OR x.ClientId = @ClientId) to its WHERE.
Execute says the query was refusedIt is not a single read-only SELECT, or reads protected data. The message says which.
A filter shows no box on the panelIts placeholder is misspelt. Write it as @{Label}, @{Label:number} or @{Label:date}, then open the panel's options again.

Was this page helpful?