0
Former Member
Aug 27, 2009 at 10:35 PM

# CR XI formula / variable problem

31 Views

I am working on a formula with declared variables. In the first iteration of the formula it prints the variable correctly. In the second iteration of the formula when I include a view, it does not print out the contents of the variables. If you can look at the following code and figure out what is wrong, please let me know.

(Iteration 1: Working code)

If {?IncludeNationality}='y'

then

local numbervar b:={Constituents.BeginDate};

local numbervar e:={Constituents.EndDate};

local stringvar born:=if b>0 then totext(b,0,'') else '';

local stringvar died:=if e>0 then totext(e,0,'') else '';

if (b>0 and e=0) then 'b. 'born''

else

if (b>0 and e>0) then ''born'-'died''

else

''

(Iteration 2: Does not work)

If {?IncludeNationality}='y'

then

local numbervar b:={Constituents.BeginDate};

local numbervar e:={Constituents.EndDate};

local stringvar born:=if b>0 then totext(b,0,'') else '';

local stringvar died:=if e>0 then totext(e,0,'') else '';

local stringvar bl:={vwArtistGeography.Birth_Locale};

local stringvar ll:={vwArtistGeography.Living_Locale};

local stringvar dl:={vwArtistGeography.Death_Locale};

if (b>0 and e=0) then 'b. 'born' 'bl''

else

if (b>0 and e>0) then ''born' 'bl' - 'died' 'dl''

else

''