Basing Text Content on Attribute Fields

To base text label content on attribute fields:

1.     In the layer property sheet, click on the Text property box, and then click the Field by Attribute button

2.     In the Use Attribute dropdown, select the field attribute on which to base the text label content.

3.     Select one of the following text label content setting modes:

§  Expression mode: SeeApplying the Text Expression Mode” in this chapter for further information.

§  User Defined mode: SeeApplying the Text User Defined Mode” in this chapter for further information.

Applying the Text Expression Mode

The Expression mode sets the text label content to the values of the attribute field you selected in the Use Attribute dropdown list. Use this mode only when the attribute field contains text values.

You can also set the text property to an expression based on a field attribute textual value.

To set the text property to an expression based on a field attribute textual value:

§  Build an expression that contains the text field attribute as a variable.

Using this option, for example, you can append the text values of the attribute field by a fixed text. For example, you can add an "St." to each street name.

A screenshot of a computer Description automatically generated

Field by Attribute Dialog – Text Expression Mode

To apply the Expression mode:

1.     In the Field by Attribute dialog, select the Expression option.

2.     In the Expression field, build an expression that contains the attribute as a variable.

§  Attribute Value: Attribute name in brackets, e.g., [ATTRIB]

§  Textual expression: Attrib name in brackets with other text, e.g., Text Before [ATTRIB] Text After

§  JavaScript expression: Bounded by <>, e.g., <JS:LCase(“[ATTRIB]”) & “Text”>.

Note:    Legacy VBScript has been deprecated and will not work in TerraExplorer Fusion.

3.     Click Apply.

Applying the Text User Defined Mode

The User Defined mode enables you to substitute specific text with a specific attribute field text value.

In this option, you can substitute text derived from a specific field attribute value with your typed text content.

Field by Attribute Dialog – Text User Defined Mode

To apply the User Defined mode:

1.     In the Field by Attribute dialog, select the User Defined option.

2.     In the Value from [Attribute] section, in the first empty row of the left-hand side column, click  and select a value from the Choose Attribute Value dialog.

3.     Click the Text column in the same row, and type the text you want displayed instead of the field attribute text.

4.     Repeat steps 2-3 above to substitute other field attribute values.

5.     Click Apply.