These Examples are to indicate only, substitute your fields in there place
Gets the value of a field called Spouse_Name_Full_scr
GetDataValue("//Spouse_Name_Full_scr")
Gets the value of a Field called Gift_Opt_Def_Benef_Rship_txt from a particular row(n) from a repeat control
GetDataValue("//Gift_Opt_Def_Benef_rpt[" + n.tostring() + "]/Gift_Opt_Def_Benef_Rship_txt")
Gets the value of a field called FieldA_yn where the value is equal to true
Dim str as String
str = GetDataValue("//Repeat_rpt[FieldA_yn='true']/FieldA_yn")
Returns true if any child is under 18 years old
GetDataValue("//Child_rpt[Child_Age_num<18]... queries all the "answers" to see if any ages are less than 18
Returns True if any gift has a Testamentary Trust
GetDataValue("//Gift_Prim_Spec_rpt[Gift_Prim_Spec_TT_yn='true']... queries the "answers" to see if any Gifts have TT
Loops through a Repeat to append a value
For n = 1 to fld.Gift_Opt_Def_Benef_rpt.NodeCount
If n <> fld.Gift_Opt_Def_Benef_rpt.NodeCount Then
retval = retval + "my " + GetDataValue("//Gift_Opt_Def_Benef_rpt[" + n.tostring() + "]/Gift_Opt_Def_Benef_Rship_txt") + " " + GetDataValue("//Gift_Opt_Def_Benef_rpt[" + n.tostring() + "]/Gift_Opt_Def_Benef_Name_Full_txt") + ", "
Else
retval = retval.TrimEnd(",")
If fld.Gift_Opt_Def_Benef_rpt.NodeCount > 1 Then
retval = retval + "and my " + GetDataValue("//Gift_Opt_Def_Benef_rpt[" + n.tostring() + "]/Gift_Opt_Def_Benef_Rship_txt") + " " + GetDataValue("//Gift_Opt_Def_Benef_rpt[" + n.tostring() + "]/Gift_Opt_Def_Benef_Name_Full_txt")
End If
End If
Next n
|