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

InsertAction - InsertAction is not valid: valueExpression.invalid

skwalerskwaler Posts: 49
edited September 2015 in Study Build, Rules, and CRFs
Hi,

I am having trouble creating an InsertAction rule where i am want to insert a value from another CRF (the source CRF is in the same event)(it is also in other events, could this be the issue?).

Using this rule assignment I get message "InsertAction is not valid: valueExpression.invalid"


I_26PAI_BPIAP



F_15BRIEFPAINI.IG_15BRI_BPI.I_15BRI_Q5






Am i referencing the source item correctly?
Do need to provide the CRF and Group OID for the target and DestinationProperty?



This works (however it is only inserting a value from an item in the same CRF)


I_26PAI_BPIAP



I_26PAI_BPIAP




Many thanks for your help.

added file, look like xml is not shown...

SK

Comments

  • agoodwinagoodwin Posts: 131 admin
    via Email
    Hi SK<

    It would be useful if you could attach the full rule xml (from what you've
    included it is not possible to inspect the expression against the target /
    destination property).

    Just a note - the expression and the destination property are relative to
    the target. This means that if it is in the same CRF, Same item group then
    only the item OID must be used. Wherever the paths branch is where you
    should begin to qualify the path. Meaning, if it is in the same study event
    but different CRF then begin the path with F_OID.IG_OID.I_OID.

    Same study event, Same CRF but different Item group:

    IG_OID.I_OID

    If the variables in your expression are in the same Study Event, same CRF,
    same Item group:

    I_OID

    Again, having the full xml will help.

    Best,
    Alicia



    On Mon, Sep 28, 2015 at 1:07 AM, skwaler
    wrote:

    > Hi,
    >
    > I am having trouble creating an InsertAction rule where i am want to
    > insert a value from another CRF (the source CRF is in the same event)(it is
    > also in other events, could this be the issue?).
    >
    > Using this rule assignment I get message "InsertAction is not valid:
    > valueExpression.invalid"
    >
    >
    > I_26PAI_BPIAP
    >
    >
    >
    > F_15BRIEFPAINI.IG_15BRI_BPI.I_15BRI_Q5
    >
    >
    >
    >
    >
    >
    > Am i referencing the source item correctly?
    > Do need to provide the CRF and Group OID for the target and
    > DestinationProperty?
    >
    >
    >
    > This works (however it is only inserting a value from an item in the same
    > CRF)
    >
    >
    > I_26PAI_BPIAP
    >
    >
    >
    > I_26PAI_BPIAP
    >
    >
    >
    >
    > Many thanks for your help.
    >
    > SK
    >
    > --
    > To manage your email notifications, please visit:
    > https://www.openclinica.com/forums#/profile/preferences
    >
    > Reply to this email directly or follow the link below to check it out:
    >
    > https://forums.openclinica.com/discussion/15767/insertaction-insertaction-is-not-valid-valueexpression-invalid
    >
    >
  • skwalerskwaler Posts: 49
    Hi Alicia,

    Here is the full xml.

    The value i want to insert is in a different CRF, same event.

    Thanks

    SK.
  • agoodwinagoodwin Posts: 131 admin
    via Email
    Hi,

    It looks like you are referencing 3 variables:

    Target = I_26PAI_CHECKED

    DestinationProperty = F_26PAINSUMMAR.IG_26PAI_PAINSUM.I_26PAI_BPIAP

    ValueExpession = F_15BRIEFPAINI.IG_15BRI_BPI.I_15BRI_Q5


    I am assuming that the value for ValueExpression is in the same event,
    different CRF.

    As mentioned in my previous response, the DestinationProperty and
    expression are relative to the target. In the rule you provided, the
    expression looks OK but you may need to update the DestinationProperty.
    Assuming the DestinationProperty is in the same ITEM_GROUP I think the
    value should be

    I_26PAI_BPIAP ( instead of F_26PAINSUMMAR.IG_26PAI_PAINSUM.I_26PAI_BPIAP )


    I can't test this on my own but see if that does the trick.

    Best,
    Alicia



    On Mon, Sep 28, 2015 at 7:56 PM, skwaler
    wrote:

    > Hi Alicia,
    >
    > Here is the full xml.
    >
    > The value i want to insert is in a different CRF, same event.
    >
    > Thanks
    >
    > SK.
    >
    > --
    > To manage your email notifications, please visit:
    > https://www.openclinica.com/forums#/profile/preferences
    >
    > Reply to this email directly or follow the link below to check it out:
    > https://forums.openclinica.com/discussion/comment/17358#Comment_17358
    >
    >
  • skwalerskwaler Posts: 49
    Hi Alicia,

    I have tried as you suggest, however still get the "InsertAction is not valid: valueExpression.invalid" error message.

    See the two attached files...

    Does it matter that these CRFs exist in multiple events? I want to insert the value from the same event.

    Thanks

    SK
  • skwalerskwaler Posts: 49
    Hi Alicia,

    Did you get a chance to look at my rule file?
    I'm still not able to get this working.

    Thanks

    SK

  • GerbenRienkGerbenRienk Posts: 837 ✭✭✭
    Hi SK,
    Maybe you're thinking the wrong way around. The insert-action is pushing a value into the destination property. The destination property can be on a different crf than the target/value-expession item (but they must be in the same event).
    However target-item and value-expression-item must be on the same CRF and this is not the case in your rule-files.

    From the looks of it you have a CRF F_26PAINSUMMAR. On it are two items, I_26PAI_BPIAP and I_26PAI_CHECKED. If I_26PAI_CHECKED not equals 1, then you would like I_26PAI_BPIAP to be filled with whatever value was entered in I_15BRI_Q5
    But this last item is on another CRF and you can not GET it from there.
    (I hope I got the right impression of what you would intend to do.)

    However there is a way of achieving this, but it would require an extra field on F_26PAINSUMMAR, let's call it I_15BRI_Q5_COPY
    First thing you do is when in F_15BRIEFPAINI any value is entered in I_15BRI_Q5, you PUSH the value of it into I_15BRI_Q5_COPY on F_26PAINSUMMAR
    Then when dataentry on F_26PAINSUMMAR is finished and Save is clicked, you evaluate if I_26PAI_CHECKED not equals 1 and if that is the case, then you insert the value of I_15BRI_Q5_COPY into I_26PAI_BPIAP (which are now on the same CRF).
    Does that make any sense?

    Gerben Rienk
  • skwalerskwaler Posts: 49
    Hi Gerben,

    yes it seems i am confused what the target item should be.

    Your impression is correct. I want values from CRF F_15BRIEFPAINI to be inserted into CRF F_26PAINSUMMAR. And these CRFs are in multiple events, I want the insert to happen in each for event.

    I have tried updating the rule and still getting errors, however I'm not sure why I need the _COPY item.
    Can't I just copy the value from F_15BRIEFPAINI to F_26PAINSUMMAR

    what I am using now is;

    Target: SE_BASELINE.F_15BRIEFPAINI.IG_15BRI_BPI.I_15BRI_Q1
    Destination: SE_BASELINE.F_26PAINSUMMAR.IG_26PAI_PAINSUM.I_26PAI_BPIAP
    ValueExpression: SE_BASELINE.F_15BRIEFPAINI.IG_15BRI_BPI.I_15BRI_Q5

    rule file attached.

    Apologizes if I am being dense :)

    Many thanks

    SK.








  • skwalerskwaler Posts: 49
    Ok,

    I think I've got it now....Logic was correct in last attempt but the path used is critical as Alicia was talking about...

    It works using these.

    Target: SE_BASELINE.F_15BRIEFPAINI.IG_15BRI_BPI.I_15BRI_Q1
    Destination: F_26PAINSUMMAR.IG_26PAI_PAINSUM.I_26PAI_BPIAP
    ValueExpression: I_15BRI_Q5


    Thanks all for your help.

    SK
This discussion has been closed.