Creating a single address line in documents

From SchemeServe Help
Jump to: navigation, search

A great many documents include address details. These are usually created using the dynamic field [ClientAddress] at some point during the document.


This then inserts the text into the document in the following format:

  • Address Line 1
  • Address Line 2
  • Town/City
  • County
  • Post Code


In certain instances this format is not going to be right for a document and it would be better to insert an address as a single line.


Creating a Single Line Address for a Client

To create an address for a client that appears on a single line in the Documents Editor you need to use the following statement (you can copy and paste it):


##[YOURADDRESSFIELD_AddressLine1_Value]#### IF([YOURADDRESSFIELD_AddressLine2_Value].Replace(' ','').Length > 0,', ' + [YOURADDRESSFIELD_AddressLine2_Value],'')####IF([YOURADDRESSFIELD_TownCity_Value].Replace(' ','').Length > 0,', ' + [YOURADDRESSFIELD_TownCity_Value],'')####IF([YOURADDRESSFIELD_County_Value].Replace(' ','').Length > 0,', ' + [YOURADDRESSFIELD_County_Value],'')##, ##[YOURADDRESSFIELD_Postcode_Value]##


The format will then be Address Line 1, Address Line 2, Town/City, County, Post Code


Creating a Single Line Address for an Agent

The process for an agent is similar and the statement you need to use is shown below (again you can copy and paste it):


##[Agent.Address1]#### IF([Agent.Address2].Replace(' ','').Length > 0,', ' + [Agent.Address2], '')####IF([Agent.TownCity].Replace(' ','').Length > 0,', ' + [Agent.TownCity], '')####IF([Agent.County].Replace(' ','').Length > 0,', ' + [Agent.County], '')##