Learn how to link a field to an existing reference table.
This article demonstrates how you can use an existing reference table as an alternative to built-in Adobe Campaign enumeration mechanisms (enum, userEnum, or dbEnum).
You can also use an existing reference table as an enumeration in your schemas. This can be achieved by creating a link between a table and the reference table, and by adding the attribute displayAsField="true".
<srcSchema entitySchema="xtk:srcSchema" img="cus:bank16x16.png" label="Bank" mappingType="sql" name="bank" namespace="cus" xtkschema="xtk:srcSchema"> <element img="cus:bank16x16.png" label="Banks" name="bank"> <compute-string expr="@name"/> <key name="id"> <keyfield xpath="@id"/> </key> <attribute label="Bank Id" name="id" type="short"/> <attribute label="Name" length="64" name="name" type="string"/> </element> </srcSchema>
<element displayAsField="true" label="Bank" name="bank" target="cus:bank" type="link" noDbIndex="true"/>
The user interface will not display a link but a field. When the user picks that field, he can select a value from the reference table or use the auto-complete feature.