Sustainable

Hard-coded list item in a comparison

A test like ITEM(Region) = Region.EMEA ties logic to one item's name; keep it once as a Boolean in a system module and reference that.

What MaxCheck detects

A comparison (= or <>) of ITEM(List), PARENT(ITEM(List)) or a list-formatted line item with a named list item, e.g. ITEM(Region) = Region.EMEA. One finding per hard-coded item across the model, on its first use, listing the line items that compare with it. A name the model uses as a LOOKUP or SUM target, or follows with [, is a property, not an item. Time, Versions, technical lists (as in S_SELECT) and system modules (a SYS token or a name starting with System) are skipped.

Why it hurts

The logic is tied to one item's name. Renaming, replacing or adding an item that should behave the same breaks it without a warning.

Example

Taken from the rule's own test cases: formulas it must flag, and formulas it must not.

HintFlags this(ITEM = member)

IF ITEM(Region) = Region.EMEA THEN 1 ELSE 0

Fine (versions)

ITEM(Versions) = Versions.Actual

How to fix

Keep the test once, as a Boolean (or a list property) in a system module for that list, e.g. SYS Region.Is EMEA?, and reference that instead.

Severity
HintShown in the report. Hints never count toward a score.
Area
Sustainable
Runs in
Basic and full check
Rule ID
S_HARDCODEDITEM
Version
Rule 1.0.0, rule set 1.4.0
Planual
2.02-12 Do not hardcode references to List memberson Anaplan's Formulas page

Does your model do this?

Upload the line-items blueprint. This rule runs in the basic check, in your browser, with no email.

Check your model