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

Multiple Questions - CRF and Rule Design

Hi OC Forum,

dm_sae : How many SAEs occurred? should take values 1 to 5 (dispaly error msg if entered more than 5)
if SAE occured =1
dm_sae_1 : SAE (1st event) upload file box
if SAE occured =2
dm_sae_1: SAE (2nd event) upload file box
dm_sae_2: SAE (1st event) upload file box
and so on ................. for the 3rd event should show only 3 file upload option
dm_sae_1: SAE (2nd event) upload file box
dm_sae_2: SAE (1st event) upload file box
dm_sae_3 SAE (3th event) upload file box

So maximum it should take 5 files
First problem In the excel file ITEM_DISPLAY_STATUS= HIDE for all the 5 files upload button, but it does not work after CRF upload to the site all the 5 upload buttons are displayed, which should not be the case.(screem shot attached)

I am confused here, while creating Rule design, what should be my 'Target' field?
is it dm_sae or the dm_sae_1,dm_sae_2,dm_sae_3 .....
the error msg should display on the value entered, if it is more than 5, and not on the click of save button.

Thank you in advance
Tagged:

Comments

  • GerbenRienkGerbenRienk Posts: 827 ✭✭✭
    Hi,
    The fact that the upload-file-items show is up probably because you are using the preview. When you're using the CRF for data-entry, the items will be hidden.

    Then for your rules: you are correct in taking dm_sae as the target (however counter-intuitive that may sound).
    You must write 5 rule-defs, let's say a-e. They should look something like:
    a: i_dm_sae eq 1
    b: i_dm_sae lte 2
    c: i_dm_sae lte 3
    etc.
    Then you will have 1 rule-assignment, that will have 5 showactions. The destinationproperty of the first one will be i_dm_sae_1, for the second one i_dm_sae_2, etc.
    These first showaction will be exexcuted when ruledef a evaluates to true, the second showaction will be executed when ruledef b evaluates to true, etc.

    If you want to make it even nicer, you add 5 hide-actions when the corresponding events evaluate to false.

    Hope this helps,
    Gerben Rienk
  • KavitaRegeKavitaRege Posts: 27
    Dear Gerben

    This is xls file. The screen shot which is attached before, is not a preview, I have taken it after saving the crf, but even than the upload buttons are not hidden. It would be helpful, if you point out what mistake I am making. Thanking you

    regards
    Kavita
  • GerbenRienkGerbenRienk Posts: 827 ✭✭✭
    Hi Kavita,
    Your CRF is fine, see attached screenshot. I uploaded it to one of our instances and assigned it to an Event. Then when it is opened for dataentry, the buttons are hidden.
    Did you manage alright to write the rules?
    Kind regards,
    Gerben Rienk
  • KavitaRegeKavitaRege Posts: 27
    Thanks Gerben,
    I got the CRF right with the hidden upload button, I have started with the rules now.
    I wanted to try with the Rule Designer, but could not set it up properly and also posted my query under Rule Designer Category, but did not receive any reply
  • KavitaRegeKavitaRege Posts: 27
    Dear Gerben,

    I am attaching the rule xml file, It is not clear how to have multiple expressions with different conditions. Ideally, the upload boxes should display on the change of value in the I_LP_DE_DM_SAE and not the click of the save button, which does not make sense. Actually, javascript onchange of dropdown values should be correct. If you can give me an idea, how to go about writing JS, taking into account all the 6 fields, it would be helpful.

    regards
    Kavita
  • GerbenRienkGerbenRienk Posts: 827 ✭✭✭
    Hi Kavita,
    I would recommend you use rules for this and accept the limitation that the buttons appear only after clicking save.
    Please try the attached, updated rule-file.
    (When I started editing I realised I gave you the wrong hints in my previous answer: I hope this did not waste too much of your time.)
    Kind regards,
    Gerben Rienk
  • GerbenRienkGerbenRienk Posts: 827 ✭✭✭
    ps. here's another version with the hide-actions included.
Sign In or Register to comment.