Attribute Types
When creating attributes for a business object, a core property is the Attribute Type. The Attribute Type is a basic property of each attribute as they determine how data is stored, how it is presented to the user and the possible values for its type. Each AppBase system comes with approximately twenty predefined attribute types (Number, Text, Phone, etc.), but creating custom types is possible.
Creating a Lookup Attribute Type
AppBase caters to the requirement to create a new attribute type in addition to the standard types provided. For example, you may want to create a field that provides a dropdown list of distinct values retrieved from a business object. To accommodate this, you can create a new attribute type of Lookup which in turn calls a rule containing a SQL Statement that returns a list of values. The new attribute can be added to pages and will show the list of values whenever clicked on.
- Navigate to Data Management > Attribute Types
- Clone the Lookup Attribute Type.
- In the popup window, enter the New Name for the cloned attribute. In our example, RPRT_lookupPriorities.
- Click the Clone button.
- To edit the new cloned attribute, click on the Pencil button.
- In the new tab window. Edit the Lookup Data section.
- Select the Rule from the dropdown list. In our example, the RPRT_lookupPriority rule. This rule doesn't need to specify any parameter.
- Select the Lookup Value and the Lookup Text. These options are retrieved from the rule.
- Configure any additional settings, if needed, under the Data properties section.
- Save the attribute.