Forms and report templates
A form decides which fields a request is filled in with. This page shows how to build forms, reuse fields across them, and how form versions keep old requests unchanged.
Who this is for: Laboratory owners and administrators · You need: the "Manage forms" permission (plus "Manage predefined fields" and "Manage report templates" for those pages)
The idea in short
Every request is filled in with a form. A form has two kinds of fields:
| Kind | Filled in | Example |
|---|---|---|
| General fields | once for the whole request | customer, inspector, date of sampling |
| Item / sample fields | once for every sample | sample description, packaging, batch number |
You find forms under Settings → Forms & reports:
- Forms: the request forms and their versions.
- Predefined Fields: fields you set up once and copy into many forms.
- Report Templates: the look of the reports your clients receive — documents, accreditation marks, columns, texts and footers.
Versions. Each time you save a form, SmartLIMS keeps a new version of it. A new request always uses the latest version. A request that already exists keeps the version it was made with, even when you edit it later. So changing a form never changes old requests. The request page shows the version next to the form name, for example "· Version 3". See the glossary.
How to create or edit a form
- Open Settings, then Forms. The list shows each form's code, how many general and sample fields it has, its laboratories, how many requests were made with it and its current version.
- Click New form, or click a form to open it.
- The form has four tabs:
- Details: Name and Code (the code goes into request numbers), Description, the Icon and Card image it is recognised by on New request, the Laboratories that use it, how its samples are numbered (see Tracking numbers), and under Work orders the Pickup time (hours): how long a work order usually waits before a technician takes it into work, which starts its estimated end (1 hour by default), and the Default sample configurers: the people assigned to configure every sample added to a request made with the form. Each sample's list can still be changed, and whoever has nothing to do on a sample takes themselves off it.
- General fields and Sample fields: the fields (see below).
- Report: the report template, approvers, images and markings (see below).
- Click Save (or Save and Stay to keep working). This saves a new version of the form. If something blocks saving — a missing name or code, a field without a label, two fields with the same name — the tab holding it opens and says what.
While there are unsaved changes, Unsaved changes shows next to the buttons, and leaving the page asks first.
📷 Screenshot: the General fields tab with a form's fields grouped into sections
Kind: testing or service
On the Details tab, Kind says what requests made with the form are:
- Testing: samples, work orders and a test report. This is the default.
- Service: no samples, for work such as a declaration or a certificate. You attach the finished document and complete the request (see Service requests). Pick the Price-list item each request is invoiced with. The sample numbering, pickup time and Sample fields don't apply and are hidden.
Once a form has requests, its kind can't be changed.
How to add fields
Each tab lists its fields one per line, in the order they appear on a request: the label (a red * when mandatory), the field name, the type, the width and small marks for the field's settings.
- Click Add field ▾ → New field, or From the field library… to copy a predefined field.
- A drawer opens with the field's settings:
- Label: what users see. Field name fills in from it (you can change it): the internal name values are stored under, which value formulas and the Financial connection use. It must be unique among the form's general fields (or sample fields).
- Type (see the table below). A Select gets its Options, one per line. An Entity gets the record type it picks, whether several can be picked, a Display template and a default record.
- Section and Width: where the field sits on the request (see below).
- Default value and Value formula (see Custom fields and formulas).
- Mandatory: users must fill it in before they can save the request.
- Click Apply, then save the form.
Click a field's line to change it. Its ⋯ menu also has Duplicate, Move to section… and Remove. Drag a line by its handle (⋮⋮) to change the order, or focus the handle and press the up and down arrow keys.
Preview shows the request form exactly as it will look with your current fields — general fields as on a new request, sample fields as one sample. Nothing typed into the preview is saved.
Sections and width
Long forms read better in parts. Put fields into sections — "Requester", "Official control", "Sampling", "Dates":
-
Add section names a new one; then add fields to it, drag fields under its heading, or use Move to section…. A section is kept only once it has a field.
-
A section's ⋯ renames it, moves it up or down with its fields, adds a field to it, or removes the section (its fields stay, in the general part).
-
On a request, every section of the general fields is a card of its own; the fields without a section come first, in a card titled "General information". Sample fields in sections get a heading inside each sample. The request's read-only page shows the same headings.
-
Width is how much of the row a field takes: a third, half, two thirds or the full row. Auto gives a text area the full row and every other field half.
-
A section can be narrower too: on its header in the builder, pick ⅓, ½, ⅔ or Full row. Two or three narrow sections then sit side by side on a request ("Requester" and "Sampling" as two half-width cards, for example), and a field's width counts within its section. The test report doesn't use section widths.
-
On the test report, the details are grouped by the same sections, with each section's name in the margin or above its fields (the report template decides). A field's Width on report decides how it sits there, apart from its width on the request:
- Auto: it shares a line with the field next to it when the form gives both half the row or less and both values are short. A long value, or a full-width field, gets the line to itself. Without the margin column, a little longer values fit.
- Half: always half a line, next to the field beside it, so it prints in the same place on every report. A long value wraps within its half.
- Full line: always a line of its own.
Fields keep the form's order. Two fields share a line only when they come one after the other.
Requests already made keep their form version, so sections you add show on new requests, not on old ones. Reports not issued yet follow the form as it is now: its sections, order, labels and report settings.
| Type | What users get |
|---|---|
| Text / String | a single line of text |
| Text area | several lines of text |
| Number | a number |
| Date | a date picker |
| Select | a list of the choices you entered in Options |
| Entity | a picker for a record you already keep in SmartLIMS, such as a customer, inspector or user. See Custom fields and formulas. |
The drawer also has Shown on report, Provided by client, Shown on opinion and Shown on notice (general fields only), Width on report (see Sections and width) and Filterable. The first four decide the test report: Shown on report puts the field on the test report, Shown on opinion on the opinion, Shown on notice on the notice, and Provided by client marks it with a small "kl" and adds the note "Data provided by the client". Mandatory changes how the request page behaves. Filterable is saved, but has no effect yet.
Rich text
A Text area can take Rich text: tick it in the field's drawer and the field gets a small editor on the request — bold, italic, underline, numbered and bulleted lists, alignment and links — and prints formatted on the test report. It applies to requests already made with the form too. Text written before you ticked it stays as it was, and you can format it the next time you edit it. If you untick it later, the field goes back to plain text: what was written keeps its words, not its formatting. On a report in another language, the field's value is translated with its formatting, like an expert opinion.
New values in a choice list
A Select or an Entity field (an inspector, a laboratory, a user — not a customer or a price-list item, which must be real records) can take Allow new values: tick it in the field's drawer and, on a request, people can type a value that is not in the list and pick Add "…". The value is kept on that request only — the field's options stay as they are, and nothing is added to customers, inspectors or any other list. On the request and the test report it shows exactly as typed. It applies to requests already made with the form too. If you untick it later, values already typed in stay on their requests.
How to reuse fields with predefined fields
A predefined field is a field you set up once and then copy into any form. Together they make up the field library.
- Open Settings, then Predefined Fields. The list shows each field's kind (General or Per sample), its type, default value and settings, and On forms: how many forms already have a field of that kind with the same name.
- Click New field ▾ and choose General field or Sample field.
- Fill in the field in the same panel a form uses, then click Save. Section, width, width on report and value formulas are not set here. They depend on the form, so you set them after you add the field to a form.
- In a form, click Add field ▾ → From the field library… and choose the field. A field whose name is already on the form is greyed out.
Each name can be used once per kind in the library. A form can hold only one field per name, so two library fields with the same name could not both be used. Use Duplicate in a row's menu to start a similar field.
The field is copied into the form. If you later change or delete the predefined field, forms that already contain it stay as they are.
How to set up report templates and report settings
A report template is the look of the reports your clients receive. Several forms can share one.
- Open Settings, then Report Templates, and click New report template (or open one).
- Set what it prints:
- Layout: Standard prints an opinion and a test report for each sample. Cumulative prints one of each over all the samples, which follow one another in the test report (see Test reports).
- Section names: where the name of each form section (for example Podnosilac) prints. Beside the fields puts it in a narrow column to the left, the most compact way. Above the fields prints it as a heading over its fields, which then start at the left edge; each section takes one line more. When a form has no section names, the fields start at the left edge either way.
- Documents: the Notice (once for the whole request) and the Opinion (for each sample) can be switched off. The Report always prints.
- Accreditation marks: on which documents the header carries them — report only (as before), report and opinion, all documents, or nowhere.
- Results columns: the method (shown next to each test), unit, reference value and measurement uncertainty.
- Texts: the sentences before the verdict and the note on data provided by the client. Each starts with the standard wording, translated into the report's language; clear one to leave it off the report.
- Signatures: the captions over the signature lines (for example Izveštaj odobrio:). Leave one empty and that line prints without a caption.
- Footers: the statements printed above the footer line of each document. A form with its own Footer text uses that for the report instead.
- Save. On the right, the page shows a real request's report printed with your settings, and it changes as you change them. Pick another request at the top of the preview.
- In a form, open the Report tab and choose the Report template.
The Report tab of a form holds what belongs to that form: the people who approve the documents (Report approvers, Report confirmers / validators, Opinion approvers, Notice confirmation), the images (Logo, ATS image — the accreditation marks, Memorandum — the letterhead; when the company prints reports in more than one language, an optional logo, memorandum and ATS image per language, used on reports in that language), the document codes (Report marking, Opinion marking, Notice marking), the Non-compliant marking and Footer text. The non-compliant marking (for example N) is added right after the number of the documents of a sample that does not comply: its opinion and report (A110325024-47N), and the notice for the samples that do not comply. Leave it blank and nothing is added.
Preview only for now: open Test reports in the sidebar (or Test report in a request's ⋯ menu) to see a request's report exactly as it prints. Every page says DRAFT until reports can be approved and issued.
Signers by department
When each department signs only what it tested — microbiology the microbiological samples, chemistry the chemical ones — set it under Signs for, below the approver lists: one row per person in them, and the departments whose samples that person signs. Leave a row on All samples for someone who signs everything, such as the head of the laboratory.
On a report with several samples, each sample's opinion and test report then carry only the signers of the departments that tested that sample on the report, plus those who sign every sample. The notice carries the signers of the departments of all its samples. Which department tested a sample comes from its groups on the work order. If none of a role's signers is set for those departments, everyone in that role signs, so a document never loses its signature. You can still change who signs when you approve the report; the departments then narrow down the people you picked. One sample's signers can also be set by hand, and those print exactly as picked (How to approve and issue a report).
Rules
| Situation | What happens |
|---|---|
| You save a form | A new version is kept. There is no separate publish step: new requests use it at once. |
| A request already exists | It keeps its form version, even when you edit it. It moves to the latest version only if a user switches it to a different form. |
| A form is used by requests or by a QC request mapping | It cannot be deleted. The Delete part of its Details tab says what uses it. |
| Two fields of one kind have the same name | The form is not saved: a request stores values by field name, so they would share one value. |
| A report template is used by a form | It cannot be deleted. |
| A version is kept | It freezes the fields, the laboratories and the numbering formats of that moment. |
Tips
- Old versions are kept for the requests that use them, but there is no screen to browse or restore an earlier version. Note your changes before you save a big rework.
- Because every save makes a new version, try a new field on a separate test form first if many people are entering requests.
- Keep Field name short and stable. Value formulas and the Financial connection refer to fields by this name.
- Put fields that many forms share (customer, inspector, sampling date) in Predefined Fields once.