Difference between revisions of "Creating a single address line in documents"

From SchemeServe Help
Jump to: navigation, search
 
Line 1: Line 1:
Insert non-formatted text here Many document templates include Client Address details.
+
A great many documents include address details. These are usually created using the dynamic field [ClientAddress] at some point during the document.
  
  
These are normally created by inserting the dynamic field [ClientAddress]at the point required in your document.
+
''This then inserts the text into the document in the following format:''
  
 +
*Address Line 1
 +
*Address Line 2
 +
*Town/City
 +
*County
 +
*Post Code
  
This will then be inserted as a block of text with Address Line 1 at the top, followed by Address Line 2, Town/County and 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.
  
This can take up quite a bit of space in your template and in some cases it may be better to show this as a single line of text.
 
  
 +
== 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):
  
You can achieve this result in the Documents Editor by inserting the following Statement at the point you require the Address to show.
 
  
 
<nowiki>##[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]##</nowiki>
 
<nowiki>##[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]##</nowiki>
  
  
This will then put all of the Address items on a single line.
+
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):
  
To achieve the same but for a Brokers Address add:
 
  
 
<nowiki>##[Agent.Address1]#### IF([Agent.Address2].Replace(' ','').Length &gt; 0,', ' + [Agent.Address2], '')####IF([Agent.TownCity].Replace(' ','').Length &gt; 0,', ' + [Agent.TownCity], '')####IF([Agent.County].Replace(' ','').Length &gt; 0,', ' + [Agent.County], '')##</nowiki>
 
<nowiki>##[Agent.Address1]#### IF([Agent.Address2].Replace(' ','').Length &gt; 0,', ' + [Agent.Address2], '')####IF([Agent.TownCity].Replace(' ','').Length &gt; 0,', ' + [Agent.TownCity], '')####IF([Agent.County].Replace(' ','').Length &gt; 0,', ' + [Agent.County], '')##</nowiki>

Latest revision as of 04:16, 17 December 2012

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], '')##