We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Rule does not run on first save


I have a cross form rule that with expression DateA gt (DateB +42)
The rules test OK.

The issue is that the rule does not fire the first time I save the section.

1) Enter a DateB that will evaluate "true"
2) Save the section 
3) It allows the section to be saved.
4) Move back to first section and save again.
5) This time the rule first pass rule fires.

It appears to be evaluating the existing value prior to saving, rather than the value that has just been entered.
Can anyone help explain what I am doing wrong here?

I am using


  • tkhajatkhaja Posts: 62 ✭✭
    edited April 2014
    Hi Richard,

    Can you please attach a copy of the rule, mainly I need to look at the target and the expression of your rule.

    I have seen this behavior in the past when the target is not relative to the expression which means you have the full path specified in your target as well as in your expression even though your dateA and dateB items belong to the same group within the CRF.

  • richard.brookesrichard.brookes Posts: 54
    Here is the rule

    <RuleRef OID="R_VISDATE6">
    <DiscrepancyNoteAction IfExpressionEvaluates="true">
                    <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="true" />
    <Message>Visit date is greater than 6 weeks since procedure, please check</Message>
    <RuleDef OID="R_VISDATE6" Name="Check if visit date is gt 6 weeks since procedure">
    <Description>Check if visit date is gt 6 weeks since procedure</Description>
  • richard.brookesrichard.brookes Posts: 54

    Based upon your reply I changed the changed expression to


    i.e. I removed the full path to the item that is referenced in the "Target"

    It works as expected now.

    PS. is this behavior noted in the documentation anywhere. I couldn't find it...


  • tkhajatkhaja Posts: 62 ✭✭
    Hi Richard,

    This is a known bug and here is the link to the bug ticket


    Please feel free to add yourself as a watcher to monitor the progress of this ticket. Let me know if you need additional information.

This discussion has been closed.