Create rules for the narrative

In the NarrativeUpdatesOnly system setting, define how the Safety Case form will group new narrative items when sending them to Oracle Argus Safety.

NarrativeUpdatesOnly = No

Item Description
When to use If you are selecting No for NarrativeUpdatesOnly to send the cumulative narrative for each transmission to Oracle Argus Safety.
Purpose To add submitted text from the editable text field into a ReadOnly field cumulatively and clear the editable text field.
Triggering controls Form submission.
Action when rule is triggered Copies narrative text entered by site to ReadOnly fields.
Rule expression
The rule below is an example of a rule that could be written on the Safety Case form. In this case, there are three editable narrative fields named:
  • D_NARRATIVE1_001
  • D_NARRATIVE1A_001
  • D_NARRATIVE1B_001
Depending on the length of the entered string and space left in each mapped field, these narrative fields are to be mapped to the following five ReadOnly fields:
  • D_NARRATIVE2_001
  • D_NARRATIVE3_001
  • D_NARRATIVE4_001
  • D_NARRATIVE5_001
  • D_NARRATIVE8_001

When the length of the entered text (combined) exceeds the combined max length of the 5 mapped fields, the mapped text in the first text box will be overwritten by the remaining text. Once the text is mapped over to the target fields, the editable field clears out.

You have the ability to update the editable narrative fields until the Send to Safety check box is checked.

evaluate on Form Submission
value =
(!this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.Empty ||
!this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.Empty ||
!this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.Empty) &&
!this.D_ESAE001.Current().D_ESAE23001.D_SAESUBMIT_001.Empty ?
(
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +
Environment.NewLine +
Environment.NewLine +
"##" +
Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +
"##" +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue("")).Length > 10000 ?(this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +Environment.NewLine +Environment.NewLine +"##" +Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +"##" +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue("")).Substring((this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +Environment.NewLine +Environment.NewLine +"##" +Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +"##" +this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue("")).Length - 10000,10000)
:
(
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +
Environment.NewLine +
Environment.NewLine +
"##" +
Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +
"##" +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue(""))
:"99"
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.Value = value.Length >= 6000 ?
value.Length >= 8000 ?
value.Substring(6000,2000):
value.Substring(6000,value.Length-6000)
: " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.
Value = value.Length >= 4000 ?
value.Length >= 6000 ?
value.Substring(4000,2000):
value.Substring(4000,value.Length-4000)
: " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.
Value = value.Length >= 2000 ?
value.Length >= 4000 ?
value.Substring(2000,2000):
value.Substring(2000,value.Length-2000)
: " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.Value =
value.Length >= 2000 ?
value.Substring(0,2000):
value.Substring(0,value.Length)
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.xNARRATIVE1N.Value =
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.Value
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.xNARRATIVE1AN.Value =
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.Value
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.xNARRATIVE1BN.Value =
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.Value
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.Value = " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.Value = " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.Value = " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.Value = value.Length >= 8000 ?
value.Length >= 10000 ?
value.Substring(8000,2000):
value.Substring(8000,value.Length-8000)
: " "

NarrativeUpdatesOnly = Yes

Item Description
When to use If you are selecting Yes for NarrativeUpdatesOnly to send the incremental narrative for each submission to Oracle Argus Safety.
Purpose To add submitted text from the editable text field into a ReadOnly field cumulatively, overwrite its corresponding Hidden field, and clear the editable text field.
Triggering controls Form submission.
Action when rule is triggered Copies narrative text entered by site to Hidden and ReadOnly fields.
Rule expression
The rule below is an example of a rule that could be written on the Safety Case form. In this case, there are three editable narrative fields named:
  • D_NARRATIVE1_001
  • D_NARRATIVE1A_001
  • D_NARRATIVE1B_001
Depending on the length of the entered string and space left in each mapped field, these narrative fields are to be mapped to the following five ReadOnly fields:
  • D_NARRATIVE2_001
  • D_NARRATIVE3_001
  • D_NARRATIVE4_001
  • D_NARRATIVE5_001
  • D_NARRATIVE8_001

When the length of the entered text (combined) exceeds the combined max length of the 5 mapped fields, the mapped text in the first text box will be overwritten by the remaining text. Once the text is mapped over to the target fields, the editable field clears out.

Also in this example, all narrative editable text fields are mapped to the same number of Hidden fields on a 1 to 1 basis.

You have the ability to update the editable narrative fields until the Send to Safety check box is checked.

evaluate on Form Submission
value =
(!this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.Empty ||
!this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.Empty ||
!this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.Empty) &&
!this.D_ESAE001.Current().D_ESAE23001.D_SAESUBMIT_001.Empty ?
(
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +
Environment.NewLine +
Environment.NewLine +
"##" +
Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +
"##" +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue("")).Length > 10000 ?
(
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +
Environment.NewLine +
Environment.NewLine +
"##" +
Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +
"##" +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue("")).Substring(
(
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +
Environment.NewLine +
Environment.NewLine +
"##" +
Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +
"##" +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue("")).Length - 10000,10000)
:
(
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.GetValue("") +
Environment.NewLine +
Environment.NewLine +
"##" +
Functions.GetSiteTime().ToString("ddMMMyyyyHHmm") +
"##" +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.GetValue("") +
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.GetValue(""))
:"99"
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE5_001.Value = value.Length >= 6000 ?
value.Length >= 8000 ?
value.Substring(6000,2000):
value.Substring(6000,value.Length-6000)
: " "
when value != "99" 
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE4_001.Value = value.Length >= 4000 ?
value.Length >= 6000 ?
value.Substring(4000,2000):
value.Substring(4000,value.Length-4000)
: " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE3_001.Value = value.Length >= 2000 ?
value.Length >= 4000 ?
value.Substring(2000,2000):
value.Substring(2000,value.Length-2000)
: " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE2_001.Value = value.Length >= 2000 ?
value.Substring(0,2000):
value.Substring(0,value.Length)
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.xNARRATIVE1N.Value =
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.Value
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.xNARRATIVE1AN.Value =
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.Value
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.xNARRATIVE1BN.Value =
this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.Value
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1_001.Value = " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1A_001.Value = " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE1B_001.Value = " "
when value != "99"
    set this.D_ESAE001.Current().D_ESAE22001.D_NARRATIVE8_001.Value = value.Length >= 8000 ?
value.Length >= 10000 ?
value.Substring(8000,2000):
value.Substring(8000,value.Length-8000)
: " "

xRuleNarrative1Ato1D
evaluate on Form Submission
value = !this.D_NARRATIVE1A_001.Empty ? 2 : 101
when value == 2
    set this.D_NARRATIVE1D_001.Value =
this.D_NARRATIVE1A_001.Valuewhen value == 2
    set this.D_NARRATIVE1A_001.Empty = true
when value == 101
    set this.D_NARRATIVE1D_001.Value = " "

xRuleNarative1to1C
evaluate on Form Submission
value = !this.D_NARRATIVE1_001.Empty ? 1 : 100
when value == 1
    set this.D_NARRATIVE1C_001.Value =
this.D_NARRATIVE1_001.Valuewhen value == 1
    set this.D_NARRATIVE1_001.Empty = true
when value == 100
    set this.D_NARRATIVE1C_001.Value = " "

xRuleNarrative1Bto1E
evaluate on Form Submission
value = !this.D_NARRATIVE1B_001.Empty ? 3 : 102
when value == 3
    set this.D_NARRATIVE1E_001.Value =
this.D_NARRATIVE1B_001.Valuewhen value == 3
    set this.D_NARRATIVE1B_001.Empty = true
when value == 102
    set this.D_NARRATIVE1E_001.Value = " "