Copy values from an Adverse Event form to a Safety Case form

Item Description
When to use You have one item on the Safety Case form that requires the Oracle InForm site user to enter a sequence ID.
Purpose Use this rule to copy information from the Adverse Event form that would allow the site to confirm that they have chosen the correct adverse event on the Safety Case form.
Triggering controls Form submission.
Action when rule is triggered Data is copied from the source form (Adverse Event) to the Safety Case form.
Rule expression

The rule below is an example of a rule that could be written on the Safety Case form to copy data over from the AE form. In this case, the rule is copying the onset date field from the AE form:

evaluate on Form Submission
value = /Calculation rule to map value in AESDTH to SAEAESDTH when identifiers in AE and SAE forms are not empty and identifiers in source and destination forms match. Clear the mapped field if source is cleared*/
!this.eSAE.Current().sctSAE001_02AE.Current().SAEAESPID.Empty &&
this.AE001.sctAE001_01.AESPID.Values.Length > 0
&&_IsValueInArray(this.eSAE.Current().sctSAE001_02AE.Current().SAEAESPID.Value,this.AE001.sctAE001_01.AESPID.Values) &&
this.AE001.sctAE001_01.cmpAESER.AESDTH.Values.Length > 0 &&
this.AE001.sctAE001_01.cmpAESER.AESDTH.AllObjects[(this.eSAE.Current().sctSAE001_02AE.Current().SAEAESPID.Value)-1] != null  ?
1 : 99
when value == 1                
                set this.eSAE.Current().sctSAE001_02AE.Current().SAEAESDTH.Value = this.AE001.sctAE001_01.cmpAESER.AESDTH.AllObjects[(this.eSAE.Current().sctSAE001_02AE.Current().SAEAESPID.Value)- 1]!=null? Convert.ToString(this.AE001.sctAE001_01.cmpAESER.AESDTH.AllObjects[(this.eSAE.Current().sctSAE001_02AE.Current().SAEAESPID.Value)- 1]): " "
when value == 99                
                set this.eSAE.Current().sctSAE001_02AE.Current().SAEAESDTH.Empty = true