Skip to content

Address Field

The address field control is used to display and edit addresses in a standardized way. Using the address control you can visualize the address in text or on a map. The layout of the address field is defined based on country setup in Basic Data Address Presentation, and is available for sections, lists, cards, and selectors.

Address Field

Figure 1 - Address Field Control

Address Field List

Figure 2 - Address Field Control in a List

Address Field Card

Figure 3 - Address Field Control in a Card

Variations

The address field control is a variant of the field.

When to use

An address field as the name suggests can be used anywhere you need to visualize and edit an address; for example, to locate a customer, work order, object, company, etc.

Limitations

If the address field is based on a reference then it cannot be edited. Also attributes from multiple references cannot be mapped to an address field.

How to use

Add the address field control as you would a Field inside the client model. The address field has 12 columns to which the relevant address attributes from the entity can be mapped. You can also map columns from a references. Note: The columns must all be from the same reference (see example 2).


field field1;  
addressfield{  
   address1 <address1_attribute>;  
   address2 <address2_attribute>;  
   address3 <address3_attribute>;  
   address4 <address4_attribute>;  
   address5 <address5_attribute>;  
   address6 <address6_attribute>;  
   city <city_attribute>;  
   country <country_attribute>;  
   county <county_attribute>;  
   state <state_attribute>;  
   zipcode <zipcode_attribute>;  
   countrycode <countrycode_attribute>;  
  }  

Keywords

None.

Properties

Below is a list of properties that can be used to customize the control.

editable | filterlabel | label | searchable | showlabel | size | visible

Example

Below are some examples of how address fields can be implemented.

Example 1


selector AddressSearchSelector for AddressSearchQuery {  
   addressfield {  
      address1 Address1Search;  
      address2 Address2Search;  
      address3 Address3Search;  
      address4 Address4Search;  
      address5 Address5Search;  
      address6 Address6Search;  
      city CitySearch;  
      country CountrySearch;  
      county CountySearch;  
      state AddrStateSearch;  
      zipcode ZipCodeSearch;  
      countrycode CountryCodeSearch;  
      label = "Address";  
   }  
   static CustomerIdSearch;  
   static LocationIdSearchA;  
}  

Example 1 - Address field control used within a selector

Example 2

Below is an example of the address field using a reference.


group DetailsGroup for JtTaskResource{  
   addressfield {  
      address1 AddressReference.Address1;  
      address2 AddressReference.Address2;  
      address3 AddressReference.Address3;  
      address4 AddressReference.Address4;  
      address5 AddressReference.Address5;  
      address6 AddressReference.Address6;  
      city AddressReference.City;  
      country AddressReference.CountryCode;  
      county AddressReference.County;  
      state AddressReference.State;  
      zipcode AddressReference.ZipCode;  
      countrycode AddressReference.CountryCode;  
      size = Small;  
      visible = [AddressReference.AddressId != null];  
   }  
}  

Example 2 - Address field control that is mapped to attributes from a reference