To Create a Value List Based on a SQL SELECT Statement
- Open the Properties dialog for an attribute and select the Value tab.
- In the Value list section at the bottom, set Type to Select.
Click the Format (...) button to the right of the SQL SELECT statement field.
When the Value Type - Select dialog opens, enter your leading SQL SELECT statement, then click the Format (...) button to select which system variables or project properties you want to add to the statement.
When the Select Variable dialog opens, select a variable from the System Variables tab and/or select a property from the Project Properties tab, then click OK.
The selected variables or properties are added to your statement. For example,
SELECT code, code_desc FROM code_table WHERE code = '$FOLDER.NAME$'
...to have the list of names stored in a table listed in the attribute field.
Click OK to close the Value Type - Select dialog.
The statement is added to the field at the bottom of the Value tab on the Attribute Properties dialog.