Skip to main content

Rule action types

This page lists every program rule action type the app knows, in one table. For each type it shows what the playground does in your browser, whether the DHIS2 server also runs it when data is imported, and any version gate.

How to read the table​

  • In the playground is what you see when a rule with this action fires in a form.
  • Server on 2.40 to 2.42 and Server on 2.43 say whether the DHIS2 tracker importer runs the action when data is imported, and so whether Verify with server or the Server effects dialog can show a server result for it. "Not run" means only data entry apps in the browser run it. This matches DHIS2 version compatibility.
  • Every action that fires also shows in the Rules, Trace and Graph tabs.

Action types​

Action typeIn the playgroundServer on 2.40 to 2.42Server on 2.43
HIDEFIELDHides the field. Shows a Hidden badge and a hidden-field placeholder.Not runNot run
SHOWFIELDShows the field again. Shown badge. See note 1.Not runNot run
HIDESECTIONHides the section. Shows a "Section hidden by" placeholder, no badge.Not runNot run
HIDEPROGRAMSTAGENo effect on the form or the Enrollment rail. Visible in the rules panel only.Not runNot run
HIDEOPTIONRemoves the option from the field's list. Hidden badge.Not runNot run
SHOWOPTIONPuts a hidden option back. Shown badge. See note 1.Not runNot run
HIDEOPTIONGROUPRemoves the options in the option group. Hidden badge.Not runNot run
SHOWOPTIONGROUPPuts the options of the option group back. Shown badge. See note 1.Not runNot run
ASSIGNFills in the value and locks the field. Assigned badge. Can also assign to a variable with no field.RunsRuns
SETMANDATORYFIELDMakes the field required. Required by rule badge and an asterisk.RunsRuns
UNSETMANDATORYFIELDMakes the field optional. Required by rule badge. See note 1.Not runNot run
SHOWWARNINGShows the warning under the field. Warning badge.RunsRuns
SHOWERRORShows the error under the field. Error badge.RunsRuns
WARNINGONCOMPLETEOn complete: warning badge. Listed in the completion banner.RunsRuns
ERRORONCOMPLETEOn complete: error badge. Blocks completion in the completion banner.RunsRuns
DISPLAYTEXTAdds an item to the Feedback or Indicators card.Not runNot run
DISPLAYKEYVALUEPAIRAdds an item to the Feedback or Indicators card.Not runNot run
SENDMESSAGENot run in the browser. Shown as a Simulated row in Server effects.RunsRuns
SCHEDULEMESSAGENot run in the browser. Shown as a Simulated row in Server effects, with the scheduled date.RunsRuns
SCHEDULEEVENTNot run in the browser. Shown in the Events section of Server effects.Not run, see note 2Runs
CREATEEVENTNot run in the browser. Shown in the Events section of Server effects.Not run, see note 2Not run, see note 2

Notes​

  1. SHOWFIELD, SHOWOPTION, SHOWOPTIONGROUP and UNSETMANDATORYFIELD are not in the DHIS2 API type list that the app is built against. The playground handles them if a rule engine result contains them, but you can't configure them as a rule action in the Maintenance or Metadata Management app.
  2. On DHIS2 2.40 to 2.42, SCHEDULEEVENT and CREATEEVENT rows in Server effects show "Not executed by this server (requires 2.43)". On 2.43, CREATEEVENT rows show "Not executed by this server", because the server declares the action but doesn't run it. See Provenance tags.
note

The app reads the DHIS2 version from the instance. If it can't tell the version, it treats the server as 2.40.

  • An ERRORONCOMPLETE or WARNINGONCOMPLETE action with no field still counts in the completion banner, as a message without a field name. See Test on-complete rules.
  • Warning and error texts under a field show the action's static text only. The evaluated data part is not added, unlike in the DHIS2 Capture app.
  • HIDEOPTIONGROUP and SHOWOPTIONGROUP need read access to the option group. TODO(verify): what you see when you don't have it.