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

ShowHide rule

   this is my first rule and I am not able to catch where I'am doing wrong. I want to show (and fill in) the field of CD38 percentage only when radio options 1 or 2 are selected in the CD38 field. In the CRF excel file the percentage field is set to HIDE. Here is my rule:

<!--  Rule for show/hide perc CD38

Created by: Cinzia
Date: 19-06-2015
Case report form: Bendamustin
Translated variables:   Study event OID:    SE_TRATTAMENTI
                        CRF version OID:    F_BENDAMUSTINR_8546_V299
                        Group OID:          IG_BENDA_G9
                        Item OID:           I_BENDA_CD38            radio options (low = 1, high = 2, unknown =3)
                                            I_BENDA_CD38_PERC      percentage specification  -->

        <Target Context="OC_RULES_V1" >SE_TRATTAMENTI.F_BENDAMUSTINR_8546_V299.IG_BENDA_G9.I_BENDA_CD38</Target>
        <RuleRef OID="R_I_BENDA_CD38_1">
            <ShowAction IfExpressionEvaluates="true">
                <Run AdministrativeDataEntry="true"
                    InitialDataEntry="true" DoubleDataEntry="true"
                    ImportDataEntry="false" Batch="false"/>
                <Message>Please enter real percentage.</Message>
                <DestinationProperty OID="I_BENDA_CD38_PERC"/>
            <HideAction IfExpressionEvaluates="false">
                <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="false" />
                <!-- DestinationProperty is the OID of the item or group of items that will be hidden when the action executes -->
                <DestinationProperty OID ="I_BENDA_CD38_PERC"/>

    <RuleDef OID="R_I_BENDA_CD38_1" Name="HideShow">
        <Description>Show the field and insert percentage</Description>
                I_BENDA_CD38 eq 1
                I_BENDA_CD38 eq 2

Where is the mistake?

Thanks a lot


  • tkhajatkhaja Posts: 62 ✭✭
    Hi Cinzia,

    Your rule looks good to me. Can you please try updating your Target oid and remove the version number(V299) from the CRF OID.

    For example:

    Let me know if it's still an issue.

  • cfelicitacfelicita Posts: 5
    Thanks Thasbiha,
               I have removed the version number, but nothing happens. The percentage field remains always hidden even if option 1 or 2 of radio button is selected.
    Maybe the rule needs to be enabled, but I do not know how. In the postgres DB the field "enabled" of the "rule" table is set to false. Is it correct?

    Thanks a lot
  • tkhajatkhaja Posts: 62 ✭✭
    Can you please upload a copy of your CRF? Thanks.
  • cfelicitacfelicita Posts: 5
    Hi Thasbiha,
    I was wrong because I was convinced that simply selecting the radio button the rule would work. I have realized that only after inserting data and save them the rule indeed works. Sorry for my unfamiliarity with rules in openclinica.
    I have anyway prepared a short version of my CRF where show hide rule is involved.

    Many thanks
  • tkhajatkhaja Posts: 62 ✭✭
    Hi Cinzia,

    No problem. I am glad the rule is now working. Yes, Rules for Edit Checks will run only when you hit save and there is an item in that section set as a target for a specific Rule. If you have built validation(s) in your CRF then the rule will not run until all the validation errors have been taken care.

    Please let me know if you need further help on your rule.

This discussion has been closed.