[]
        
(Showing Draft Content)

Add an Attribute

An attribute represents a data column in a database table. Each entity has its own set of attributes and relations. In Wyn Enterprise, you can create an attribute by either binding to an existing field in the entity or writing a SQL query to generate one. This article describes the steps to add an attribute in a data model and its important properties. For more information, refer to the following sections.

Add an Attribute

  1. In the model attribute, select an attribute for which you want to add a new attribute.

  2. Click the Add button next to the selected attribute.


    Add an attribute in the model editor

  3. In the Add Attribute dialog box that appears, enter the name of the new attribute.


    Add attribute dialog box

  4. Specify additional information about the new attribute such as whether it can accept null values and duplicate values using the Is Nullable and Is Unique properties.

  5. If you are adding a new attribute by binding, select the Field option from the Binding section, and then select a data attribute in the provided list as shown.


    Add an attribute by a SQL query


    Or,


    If you want to add a new attribute through a SQL query, select the SQL Query option from the Binding section and enter the SQL statement to add the new attribute. The below query calculates the revenue by unit area.


    Add an attribute by a SQL query

  6. Click the Validate button to verify the data binding or SQL query.

  7. Control the appearance of the new attribute using the Is Hidden property.

  8. Finally, click the Add button to confirm.


    Add the attribute


    A newly added attribute will appear in the list of attributes on the left. You can modify the properties of the new attribute in the Properties panel that appears on the right.


    Newly added attribute

Search Attribute

Follow the below steps to search for an attribute from a direct query model.

  1. Go to the Entities list, and select the entity for which you want to search the associated attribute. Enter the name of the attribute in the search bar above the entity list. The searched attribute will be listed as shown below.


    Search Attribute Gif

Important Properties

The following table describes the important properties of an attribute that you can set in the Data Model Designer.

Property Name

Description

Name

The name of the attribute.

Is Nullable

Specifies whether the attribute can contain null values.

Is Unique

Specifies whether the attribute can accept duplicate values.

Contains TimeZone

Determines whether the DateTime attribute contains the local timezone values. You can set the property to the following values:

Contains: Detects timezone information in the DateTime attributes.

Not Contains: Ignores time zone information in the DateTime attributes.

UnSpecified: This value only appears when an old version of the data model is migrated to a new version and does not include the local timezone in the DateTime attribute.

This property is specifically used with the DateTime attributes where timezone is also included like DateTime offset.

Binding

The database object that the attribute represents.

Logical Data Type

The attribute data type. If there is an expression, the data type must match the data type of the expression.

Data Category

Gives visualization hints related to the attribute type when generating a smart scenario through the Visualization Wizard. Different data types have different possible values. For example, the string data type supports these values: Geography (Country, State/Province, City, District), Image URL, or Image Binary. The numeric data type supports these values: Currency, Geography (Latitude, Longitude).

Is Hidden

Indicates whether the attribute is hidden from end-users. When the data model is used in the report, hidden attributes are not displayed.