Skip to Content
0
Former Member
Jul 15, 2014 at 09:38 PM

how to display record name & spouse name when spouse not deceased. Otherwise, show record name only.

23 Views

I'm trying to display spouse names along with the record name (all in one table). However, if spouse is deceased, I want to display only record name. It works fine except that if spouse name field is blank, then nothing shows up.

// *********** Caputre spouse names ****************

Stringvar spouseName;

if not isnull({YMRE_Constituent.SpouseName}) THEN

spouseName := {YMRE_Constituent.SpouseName}

else

spouseName := "";

// **************** Capture Deceased spouse value

stringVar spDesceasedYN;

if {YMRE_Constituent.SpouseDeceased} IN ["Y", "N"] THEN

spDesceasedYN := {YMRE_Constituent.SpouseDeceased}

else

spDesceasedYN :="";

//***** if spouse deceased, show primary name only. otherwise, show both couples.*******

if spDesceasedYN = "N" THEN

{YMRE_Constituent.Fullname} + chr(10) + spouseName

else

{YMRE_Constituent.Fullname}

Thanks ahead of time for helping.