Cross-form Derivations
22R3 & later
With Cross-form Derivations, Vault derives values across forms in a casebook when you add the Derived component to forms in Studio’s drag & drop editor and create Set Derived Value rules.
Vault keeps values of derived items up to date regardless of the status of the form that the items are in. Derived values can change even when the form is submitted, locked, frozen, or signed, and they are automatically updated without resubmission of the derived target form. Derived items can be configured to display or not display in both Data Entry and Extracts.
Cross-form Derivations and single-form derivations are mutually exclusive. If you have an existing study with Set Item Value rules, that study can’t be manually switched to Cross-form Derivations.
Enabling Cross-form Derivations
You can enable cross-form derivations in a Study that was created prior the 22R3 release as needed. You must have the Vault Owner security profile to enable this feature.
To enable cross-form derivations for a Study that has not yet published to production:
- Fully delete any Set Item Value rules in your development environment. Contact Veeva Support if needed.
- Navigate to Admin > Business Admin > Study Configurations.
- Click the Name of your Study to open it.
- Click Edit.
- Select Cross Form for Derivation Version.
- Click Save.
- In Studio, add derived items and set display visibility for any new or existing derived items.
- Create new Rules with the Set Derived Value action.
To enable cross-form derivations in a Study that has published to production:
- Perform steps 1 through 8 in the procedure above.
- Deploy your changes through to your production environment.
- Perform retrospective amendments to upgrade existing Casebooks to use cross-form derivations. If you don’t run an amendment, any derived value set by a Set Item Value (single-form derivation) rule will not be cleared, and any new Set Derived Value rules won’t apply to the casebooks on the old version.
- Run your Set Derived Value rules from Tools > EDC Tools > Rules to set values in existing casebooks.
- Re-run Review Plan jobs to set new cross-form derived items as No Review.
If a derived item used in single-form derivation is removed from an item group, any Production data that exists on that Item will be permanently deleted.
To avoid this, you can use the same derived item used for single form derivations after switching the study to cross-form derivations without removing it. It is recommended that you update the item properties in the existing derived item that was used for single form derivations. After switching the study to cross-form derivations, update the derived item’s display visibility and create a new Set Derived Value rule. The derived item’s value will update when the new rule is executed.
While upgrading to cross-form derivations is supported, any unsupported changes or deletions are still considered destructive changes. Contact Veeva Support to temporarily allow destructive changes in your study.
Configuring Cross-form Derivations
To utilize Cross-form Derivations, you must create an item with the Derived component type and add it to a form and create a Set Derived Value rule.
To use the Derived component type:
- Navigate to Studio > Schedule > Drag and Drop Editor.
-
Create an Item with the Derived component type. Note that derived items can’t be Labels or Form Link items. The default Data Type is Text.
- Add the derived item to a form by clicking and dragging.
- Click on the derived item to access the Properties Panel. Set the Display Visibility to Include in Data Entry and/or Include in Extracts. See below for more information about Display Visibility options.
To create a Set Derived Value rule:
- Navigate to Studio > User Defined Rules and click +New Rule.
- Fill out necessary fields and add your formula or expression in the Expression field. Your expression can reference one or multiple forms. Note that when a value on a repeating form or item group sets a derivation result, the derived value will be updated each time a matching instance of the source is submitted.
- Choose Set Derived Value as the Rule Action. Note that Set Derived Value rules can only Action on Derived-type items. Query rules, Subject Status rules, and other rule types can’t point to derived items.
- Set the Action Target. The Action Target for a Set Derived Value rule can be fully or partially-qualified. Action can point anywhere in the Casebook.
- Click Save.
Note that Cross-form Derivations can be used with repeating constructs, however, in many cases, this requires a large number of rules that each align with different sequence numbers.
As with other rules, @Form identifiers in a Set Derived Value rule action will scope to the current form only, and only set the value on the appropriate instance. Fully-qualified identifiers in a Set Derived Value rule action will set the value for all matching instances.
All studies created after the 22R3 release will use Cross-form Derivations. Contact Veeva Support if you would like to switch an existing study to Cross-form Derivations.
If a Derived item is used as a study reference value for Procedures and the item is derived from source values on different forms, you must resubmit the target form to display the updated value in the Procedures module.
Display Visibility
The table below details the behavior associated with each Display Visibility option.
Display Visibility | Behavior when Included | Behavior when Not Included |
---|---|---|
Include in Data Entry |
|
|
Include in Extracts |
|
|
*These behaviors are true when the Display Visibility is “Include in Extracts” only. If Display Visibility is set to both “Include in Data Entry” and “Include in Extracts,” the included behavior will override the not included behavior.
Note that if “Include in Extracts” isn’t included in Display Visibility, the Derived field will still display for CDB users.
Example Set Derived Value Rules
Refer to the examples below for more information about creating Set Derived Value rules:
Example 1
#define VALUE1 $EG1.EV1.F1.IG1.ITEM1
#define VALUE2 $EG2.EV2.F2.IG2.ITEM2
VALUE1 + VALUE2
Action Identifier: $EG3.EV3.F3.IG3.ITEM3
In this example, a derivation result is created for the action identifier when F1 or F2 are submitted. *If F3 (or any other part of the action identifier) is repeating, the derived value would be set for all instances. *If either of the identifiers in the expression are repeating and a sequence number isn’t specified, the rule scope should be set to the level of the repeating object. For example, if EG1 is repeating, the rule scope should be Event Group. Otherwise, you should use a sequence number or aggregate identifier for repeating identifiers.
Example 2
#define VALUE1 @Form.IG1.ITEM1
#define VALUE2 @Form.IG2.ITEM2
VALUE1 + VALUE2
Action Identifier: @Form.IG3.ITEM3
Rule Details Form: F1
This example functions in the same way that single form derivations functioned: once F1 is submitted, the derivation result is set for that current form only.
Example 3
#define VALUE1 $EG1.EV1.F1.IG1.ITEM1
#define VALUE2 $EG2.EV2.F2.IG2.ITEM2
VALUE1 + VALUE2
Action Identifier: @Form.IG3.ITEM3
Rule Details Form: F3
This example use case would ensure that a specific value is displayed in a specific form definition (F3) wherever it is used in the schedule. A derivation result is created globally.
Example 4
#define VALUE1 $EG1.EV1.F1.IG1.ITEM1
#define VALUE2 @Form.IG2.ITEM2
VALUE1 + VALUE2
Action Identifier: @Form.IG3.ITEM3
Rule Details Form: F2
This example derivation would only execute for F2 forms that exist as it can’t display the value on the first load of the F2 form, because the form must exist and be submitted before a derivation result can be created. For each submitted F2 form instance, a derivation result is created.
Example 5: Carry Forward Values
#define HEIGHT $egSCR.evSCR.VS.igVS.HEIGHT
HEIGHT
Action Identifier: @Form.igVS2.HEIGHT2
Rule Details Form: VS2
This example derivation would carry the Screening HEIGHT value into all instances of VS2 in the casebook.
Progressive Display & Form Links
The following points should be taken into consideration when using Progressive Display and Form Links with Cross-form Derivations:
- Derived items can be controlled by Progressive Display but can’t be used as controlling items for Progressive Display.
- You can use derived items as display items for Form Links if the Display Visibility field for your derived item is set to Include in Data Entry.
For more information on Cross-form Derivations, see Tips & Best Practices for Rules.