Skip to content
Part 8 of 12

Formulas with a Safety Net: Calculated Fields in Maximo Inspection Forms

A formula in a Maximo inspection form is stored by Manage and computed by the inspection app on the device. Some formulas pass Manage and leave the field empty on the device. We show which ones, and how our editor catches them while the administrator types: aliases from the label, a list after the colon, two checks, safe renames and a preview that computes.

A pencil drawing of two wooden posts joined by a plank with three orange balls on it, a teal net hung between the posts holding a fourth ball, and an old oil can at the foot of the left post

A calculated field computes its value from other answers of an inspection form, such as the oil used between two readings. In IBM’s Inspection Forms application, the administrator writes the formula into a text box on the Formula tab. The Validate tab has one input per alias, Test formula and the calculated result. Three things are hard all the same. A renamed alias leaves every formula that names it as it was, with the old alias. Manage checks an unknown alias only at activation. And some formulas that Manage accepts compute nothing on the inspector’s device.

This article shows each of the three, and what mas-tools.com Inspection Form Editor does about it. We checked the behaviour on our test system, on the MAS 9.2 series.

Two systems read one formula

Manage stores the formula, and the inspection app computes the value on the device, from the answers the inspector gives. Manage checks a formula when it is saved, and it checks the aliases again at activation. The inspection app has its own set of functions, and that set is smaller than the set Manage accepts. So a formula can pass every check in Manage and still leave the field empty on the device.

We sent formulas to Manage’s own formula check on our test system. The table shows what Manage answered, what the inspection app does with the formula, and what the editor says. The aliases are the ones of our beam engine example: OILSTART and OILEND are the two readings of the oil reservoir, and OILUSED is the calculated field.

Formula Manage’s formula check On the device The editor
sumf(:OILSTART) refused never reaches it error: Manage does not allow sumf
:OILSTART * 1,5 refused never reaches it error: write 1.5 for 1,5
:OILSTART - :OILEN, an alias that no field has accepted never reaches it: the activation stops error while you type
max(:OILSTART, :OILEND) accepted no value error, with if(:A > :B, :A, :B) as the way to write it
:OILSTART :OILEND, two values without an operator accepted no value error: put an operator between them
an alias with an underscore accepted no value the alias box names the underscore
an alias written in lower case accepted no value error

Two of these went further on our test system. Manage activated a form whose formula named an alias with an underscore, and a form whose formula named an alias in lower case. The inspection app computes neither of the two. A formula with an alias that no field has, or with the alias of its own field, stops the activation in Manage.

An alias from the label

A formula names a field by its alias, with a colon before it, such as :OILSTART. Propose writes an alias from the field’s label or from its question: “Pad thickness (mm)” gives PADMM. An alias has the capitals A to Z and the digits, with a capital first. It has at most 25 characters, and it is unique in the revision.

The alias box names any other character and keeps what you typed until you change it. The underscore is the case that matters: Manage stores it, and the inspection app does not read it in a formula.

A colon lists what a formula may name

The editor with question 1.3 Oil used on this round open: the alias OILUSED, the formula  - :OILEND: and the list of the fields a formula may name.

A colon in the formula box lists the fields a formula may name, with their questions and types.

In the formula box, a colon opens the list of the fields that a formula may name, each with its question and its type. A calculated field, an upload, a signature and a geolocation field are left out of the list. A field without an alias is in the list too, and it gets its alias when you pick it. In the picture, the crank bearing would come in as :CRANKB.

Two checks while you type

The box checks the formula while you type. It names an alias that no field has, the field’s own alias, a function Manage does not allow, a decimal comma, and two values without an operator. A moment later, Manage’s own formula check answers too.

A formula that Manage refuses is an error of the form check, in the Check tab and in the outline. The formula waits, and it is saved as soon as it is fixed. The rest of the form is saved in the meantime. An error keeps Activate closed, so a formula that Manage would refuse never reaches the activation.

Each message says what to write. These two come from the form check, for the beam engine round:

The formula of 1.3 Oil used on this round (litres) uses max, which Manage takes and the inspection app does not compute: the field stays empty on the device. For the larger of two values write if(:A > :B, :A, :B).

The formula of 1.3 Oil used on this round (litres) has a comma outside the brackets of a function. Write 1.5 for 1,5.

Under the box, the link Functions and signs a formula may use opens the editor’s Help at the list. The Help also names the three functions that Manage takes and the inspection app does not compute: max, min and random. A decimal number takes a point, such as 1.5, and a comma only separates the values of a function.

A test with values you type

Test the formula under the box takes a value for each field the formula names. A value can be a number, a text, a choice, a value of a domain, a meter reading, a date, a date and time, or a time. The test shows the result as the inspection app computes it, or why there is none. The functions date, datetime, now and time compute there too. They count in the browser’s time zone, as the app counts in the device’s. The values stay in the test, and the preview keeps its own answers.

A rename that keeps every formula

We measured it in Manage: after a rename, the formula still names the old alias. A formula with an alias that no field has then stops the activation.

In the editor, the rename of an alias rewrites every formula that names it. The rename and the changed formulas are one step to undo, and they reach Manage in one save.

The preview computes as the inspection app does

The preview of the mobile app: 30 and 22 litres entered, 8 computed for Oil used on this round, and the message More oil than usual. Look for a leak at the beam centre bearing.

The preview computes the oil used and shows the message of a rule on the result.

The preview in the side panel answers like the mobile app. In the picture, 30 litres before the round and 22 litres after it give 8 litres used. A rule on the calculated field reads the result: above 5 litres, it shows the message to look for a leak, and it requires an action.

Where the preview cannot be sure of a formula, it says which part it leaves to the app. Where the app computes no value, as for max, the preview says why. So the empty field shows up in the preview, before an inspector meets it on the device.

A formula that Manage and the app both read

A formula that the editor saves is stored as Manage stores any formula, in the same object structure that IBM’s application uses. IBM’s application shows it, and the inspection app computes it on the device. The difference is in what reaches Manage: an alias that the app reads, a function that the app computes, and a formula that still names the right fields after a rename.

What comes next

The user guide shows the steps of a calculated field: Formulas: a field that computes its value. The next article is about the form check and the preview as a whole: Found Before the Inspector Finds It. Forms with formulas also travel between systems as files: Inspection Forms as Files. The mas-tools.com Inspection Form Editor page lists the whole series.

Do you have calculated fields that stay empty on the device? Get in touch.

IBM and Maximo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.

← Back to mas-tools.com Inspection Form Editor

See the tools on your own data.

Ask us for a price, a trial licence or a demo. We work in English and German.