31 Dec 2018: Thank you to our knowledgeable and friendly forums users for another great year. We are aware of the uptick in spam accounts and are doing our best to ban these at first sight. Thank you for your patience!

Rule is not hiding items

I want to show and hide some fields based on birth dates, and I have the following rule:

<RuleImport>
	<RuleAssignment>
		<Target Context="OC_RULES_V1">SE_REGISTRO[ALL].F_LCERASPORPRE.IG_LCERA_UNGROUPED.I_LCERA_FECHANACIMIENTO</Target>
		<RuleRef OID="REGLA_MOSTRAR_BRADEN">
			<ShowAction IfExpressionEvaluates="true">
				<Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="false" />
                <Message>Mostrando Braden</Message>
				<DestinationProperty OID="IG_LCERA_BRADEN"/>
				<DestinationProperty OID="IG_LCERA_UNGROUPED.I_LCERA_EJEMPLO"/>
				<DestinationProperty OID="IG_LCERA_UNGROUPED.I_LCERA_PERCUSIONTISULARNEO "/>
			</ShowAction>	
					
			<HideAction IfExpressionEvaluates="false">
				<Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="false" />
                <Message>Ocultando Braden</Message>
				<DestinationProperty OID="IG_LCERA_UNGROUPED.I_LCERA_EJEMPLO"/>
				<DestinationProperty OID="IG_LCERA_BRADEN"/>
				<DestinationProperty OID="IG_LCERA_UNGROUPED.I_LCERA_PERCUSIONTISULARNEO "/>
			</HideAction>
		</RuleRef>
	</RuleAssignment>
	
	<RuleDef OID="REGLA_MOSTRAR_BRADEN" Name="REGLA MOSTRAR BRADEN">
		<Description>Mostrar braden si la fecha de nacimiento es mas de 5 años</Description>
		<Expression>IG_LCERA_UNGROUPED.I_LCERA_FECHANACIMIENTO eq ""</Expression>
	</RuleDef>
</RuleImport>
where
  • IG_LCERA_UNGROUPED.I_LCERA_FECHANACIMIENTO is a mandatory date field in the first section of a CRF.
  • IG_LCERA_UNGROUPED.I_LCERA_EJEMPLO is a text field in the first section of the same CRF.
  • IG_LCERA_BRADEN is a group that shows in the third section of the same CRF.
  • IG_LCERA_UNGROUPED.I_LCERA_PERCUSIONTISULARNEO is a field in the third section of the same CRF.
Now, I expect that when I set a value in IG_LCERA_UNGROUPED.I_LCERA_FECHANACIMIENTO, when I go to the third section then the fields and the group would be hidden, yet they are shown without any issue. Also, no message is shown related to the I_LCERA_FECHANACIMIENTO. Even if I complete the CRF and open it again, all of the fields are shown.

The rules are imported without warning, and if I test them in OpenClinica they seem to work okay.

What I could be missing?

Thanks in advance.
Tagged:

Comments

  • haenselhaensel Posts: 602 ✭✭✭
    Hi

    I'm not aware if it is still an issue. In older OC versions the SHOW/HIDE for groups was not working probably. It was possible to show a hidden group but not to hide a shown group.

    If you test your rule does the show/hide work for all three elements (I_LCERA_EJEMPLO, I_LCERA_PERCUSIONTISULARNEO and IG_LCERA_BRADEN)?

    It might be worth a try to set the group to HIDE by default and check if at least the ShowAction works.

    good luck,
    Christian
Sign In or Register to comment.