Hi All,
I have a file form that has a variable named loc:returnaddress and is populated as a text field on the form. On an update I want to display the data files separate address fields as a block of text. So I tried the PreUpdate routine to fill the local variable with the text from the separate fields from the database but nothing is displayed. So where would one call this routine to load the loc:returnaddress field
Routine looks like this;
LoadAddress ROUTINE
Access:production.Open()
Access:production.UseFile()
CLEAR(pro:Record)
pro:job_id = CLIP(p_web.GSV('pro:job_id'))
IF NOT Access:production.Fetch(pro:PRIMARY) THEN
IF LEN(CLIP(pro:name)) THEN
loc:returnaddress = CLIP(loc:returnaddress) & CLIP(pro:envelope_name) &'<13,10>'
END
IF LEN(CLIP(pro:company)) THEN
loc:returnaddress = CLIP(loc:returnaddress) & CLIP(pro:envelope_company) &'<13,10>'
END
IF LEN(CLIP(pro:address2)) THEN
loc:returnaddress = CLIP(loc:returnaddress) & CLIP(pro:envelope_address2) &'<13,10>'
END
IF LEN(CLIP(pro:address1)) THEN
loc:returnaddress = CLIP(loc:returnaddress) & CLIP(pro:envelope_address1) &'<13,10>'
END
IF LEN(CLIP(pro:csz)) THEN
loc:returnaddress = CLIP(loc:returnaddress) & CLIP(pro:envelope_csz) &'<13,10>'
END
END
p_web.SetValue('loc:returnaddress',loc:returnaddress)
p_web.SSV('loc:returnaddress',loc:returnaddress)
Access:production.Close()
EXIT
Regards,
Ashley