Setting Up Flag Rules
A flag rule watches one answer on a user input view. When the answer matches, the rule raises a named flag on the request: it is recorded, shown to whoever handles the request, and can e-mail somebody, send the request to a different stage, or hold it until a person has looked. Use it for answers that matter, such as a declared medical condition, without anybody having to read every submission to find them.
Where to find it
Architect Panel → Forms:
- User Input Views — Manage Flag Rules on the view, beside its Flag Rules count
- Process Inspector — the Flags raised by the answers section
Flag rules work on any view, including one with no stages. If the builder shows no Flag Rules line, the feature is not installed on your system.
Writing a rule
- Press Manage Flag Rules. The screen is headed User Input View - Flag Rules.
- Set Flag Rules to Yes and fill in the first rule. Use Add Another Flag Rule for more.
- Field Name: the field's row name on the datastore, not its title.
- Comparison operator and value: the test. A yes/no question should be a tickbox field, which stores 1 for yes and 0 for no, so the test is equals 1.
- Flag Name: what the flag is called everywhere it is shown, for example Medical / Allergies. Several rules may raise the same name.
- Notify: who is told. Choose a field on the form, a custom function your developer provides, a static address, or the original requester (who must be signed in). Leave it unset to raise the flag and tell nobody.
- Send From: the e-mail account. Required if anybody is notified; the platform never guesses one.
- E-mail Template: optional. Without one the platform writes the message, with the view name, reference and flag name in the subject and the request's details in the body. In your own template,
##AMDATA/FLAGS##lists the flags on the request. - Send To Stage Number: optional. Sends a flagged request to this stage instead of where it would otherwise go. Stage 2 or above.
- Hold The Request: tick to stop the next approver being told until somebody releases the hold.
- Press Save Flag Rules.
Avoid testing a manual dropdown or radio list. Those store an internal number that differs between installations, not the words shown, so a rule written on one system may not match on another. Use a tickbox or a pills field.
When rules are checked
- At submission, on the requester's answers.
- At every stage approval, on what that stage's form collected. A question asked at a later stage can therefore raise a flag.
- Not on a manual stage transfer by an administrator.
- Every matching rule fires. Two different flags on one request are both raised.
- Once per rule per request. A rule that matches again later raises no second flag and sends no second e-mail.
When consequences clash
- Stage: the first matching rule that names a stage wins, and it beats Initial Stage Assignment. It can only move a request forwards; a rule that would send it back to an earlier stage is ignored and logged.
- Hold: any matching rule asking for a hold holds the request.
- Nowhere to go: on a view with no stages, or a rule matching at the last stage, the flag is raised and notified but the stage and hold are dropped.
What goes wrong
- A rule never fires: Field Name is the title rather than the row name, or the field is not drawn on any stage so the answer never arrives. A rule naming a field the submission did not carry never matches.
- A rule is skipped: it has no field, no flag name, or an operator that no longer exists. It is logged and ignored.
- No e-mail: Notify is set but Send From is empty, or the recipient could not be resolved. The flag is still raised, and the request's progress page shows that its notification failed. A failure never stops the submission.
Worked example
A work-experience application asks Do you have any allergies or medical conditions? on its Data Collection stage, as a tickbox with row name medicalcond. The rule tests medicalcond equals 1, raises Medical / Allergies, notifies the static address of the occupational health team from the hub's account, and ticks Hold The Request. A student who ticks yes still gets their progress e-mail, but the placement supervisor is not e-mailed until occupational health has reviewed the application and released the hold.
Recommendations
- Use tickboxes for the questions rules test.
- Always set Send From when anybody is notified.
- Hold only where review is needed; a hold stops the process until a person acts.
- Grant Edit Existing to whoever must clear flags and release holds.