Issue with "Prevent Adding New Events to Stage" Not Working in Program Rule

Hi everyone,

I have a Tracker program with two stages:

  1. Screening
  2. Follow-up

I want to stop the Follow-up stage if BP Classification = “Normal”.

What I Did:

Created a program rule with this condition:
d2:hasValue(#{bp_classification}) && #{bp_classification} == “Normal (<120/80 mmHg)”

Actions applied:
Show Error → Works
Prevent Adding New Events to Stage→ Not working

Issue:

Even when BP Classification is “Normal,” users can still add a Follow-up event.
Tried Solutions:

Cleared cache and refreshed metadata
Tested in both Tracker Capture & Capture apps
Tried different conditions but no change

Has anyone faced this issue? How can I fix it? Thanks!

Hi @SanghArsha_PyakuRel

Would you please share how the program rule variable is configured? In this case, when you need to get a value from another separate stage, a program rule variable is required.

Probably it’ll be (Data element from the newest event for a program stage) as you can see in the screenshot:

Waiting for your feedback! Thanks!

Hello @Gassim,

Thank you for your response. Sure, I will share how I configured the program rule variable. I have tried both “Data element from the newest event in the current program” and “Data element from the newest event for a program stage”, but I faced the same issue. I will also share a screenshot of the program rule variable configuration.


Thank you!

Thank You @Gassim ! It works what you say but auto event creation should be closed.