# Defining attribute properties

When a datasource is created using a table, the platform generates an attribute for each column in the table. You can also create an attribute manually. You can edit the properties of the attributes as per the requirement.

An attribute can have the following properties:

| **Property**                 | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**                     | <p>The name of the attribute being created</p><p><strong>Note</strong>: The name should not contain any special character other than space.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Type**                     | <p>The data type of the column</p><p><strong>Note</strong>: The number columns are of the data type decimal and the character columns are of the data type String.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Length**                   | The maximum length of the data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Scale**                    | The maximum number of decimal places allowed in numeric data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Default Value**            | <p><strong>Note</strong>: You can define a default value for the attribute that will be set if the user does not enter the value for the attribute.</p><ul><li>UUID: generates and populates the attribute value with a Universally Unique Identifier (UUID)</li><li>OrgID: populates the attribute value with the Org Id of the current subdomain</li><li>SYSDATE: current date</li><li>master.attributeName: Populates the attribute value from a parent/master row</li><li>CURRENTUSER: The username of the signed in user</li><li>CURRENTUSERID: The user id of the signed in user</li><li>=SELECT: Executes the given select statement and populates the attribute with the resulting value</li><li>PASSWORD: Populates the attribute value with the hash value of a randomly generated 12 alphanumeric value. The actual password value in clear text will be populated withattributeName\_clear. For example, if pwd is the attribute name, then pwd\_clear will have the generated value and pwd will have the hash value.</li><li>String or Number Constant Value: If the specified value doesn't fall under any of the above, then it is treated as a constant value.</li></ul> |
| **Insert**                   | Indicates whether the user can provide a value while inserting a row                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Update**                   | Indicates whether the user can change the value while updating a row                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Calculated**               | Indicates whether the attribute is a calculated value and should not be included in Insert or Update                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Column name**              | The column name in the database that the attribute is mapped to                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Out Parameter**            | Applicable when **UseAPI** is selected while defining the datasource details. The parameter in the API will be treated as IN OUT type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Primary**                  | Indicates that the attribute is a primary key                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Auto Sequence**            | <p>Indicates that the value is generated from a database sequence.</p><p>If selected, in the <strong>Default Value</strong> column, enter the sequence name</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Optional**                 | Indicates if the attribute can be left blank by the user                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Audit**                    | Indicates if the changes to the attribute value should be audited                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Query**                    | <p>Indicates that the column should be automatically included in the Where Clause when a value is passed during a query.</p><p>When this property is not selected, the platform will not include the column in the where clause even if a value is specified. The developer should programmatically handle its value through the pre-query script.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Disable Uppercase Search** | <p>By default, the where clause is constructed as <code>UPPER(column) LIKE 'VALUE%.</code></p><p>When this property is selected, <code>column = 'Value'</code> is constructed instead, which gives better performance when the column is indexed without using the UPPER function</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Select**                   | Indicates if the column is a part of the select clause                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Export**                   | Indicates if the column is a part of the select clause while exporting the data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Param Name**               | Applicable when Use API is selected while defining the datasource details. By default, the parameter name is assumed to be P\_COLUMN\_NAME. If the parameter name in the API is other than P\_COLUMN\_NAME, then specify the exact parameter to be used here.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

* To fetch all the attributes and their values from the database, in the **Attributes** tab, in the actions bar, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2F09fdce2515a6c62ca30f412ecd756ec9d61bd62d.png?generation=1600439426902315\&alt=media). The data from the database is displayed n the table in the **Attributes** section.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2Fe588fd2de72092767fd71ee5a7ad59ef960a7221.png?generation=1600439426764105\&alt=media)

* To create an attribute, in the **Attributes** tab, in the actions bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2F610bce9b29d67fab8ec4c9ae1dc08f8468305ab3.png?generation=1600439426498215\&alt=media). A row is added in the **Attributes** section. You can select/enter the required properties for each attribute.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CL4FawRAfaE3p3muk%2F-M2CMDgvKRmMB22lSTuR%2FAttribute%20row%20added.png?alt=media\&token=74115b86-ae46-40f6-bdcd-6f735223e3c7)

* To set the attribute property, for the required attribute name, enter or select the appropriate values for the corresponding columns.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2DHUBIujcEgUDfVZdW%2F-M2DIfn9NnbLtOLlPEMc%2FSet%20Attribute%20Property.png?alt=media\&token=d0e450c2-d52f-4323-902a-f7d9dad65bbb)

* To search for a specific attribute value,

a. In the **Attributes** tab, in the actions bar, click<img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CL4FawRAfaE3p3muk%2F-M2CNP00nqyPiw6dVjMx%2Fsearch%20icon.png?alt=media&#x26;token=4122d2ab-d96d-4404-baae-48da864e123b" alt="" data-size="line">. Search filters are displayed for each attribute. Clicking on<img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CL4FawRAfaE3p3muk%2F-M2CNP00nqyPiw6dVjMx%2Fsearch%20icon.png?alt=media&#x26;token=4122d2ab-d96d-4404-baae-48da864e123b" alt="" data-size="line">again will hide with search filters.

b. To search for a specific attribute values, in the search filters for the respective attribute(s), select the search criteria. The attributes are displayed as per the search criteria.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2Ff603c07d732c21cfc976db40e9e08f408ba8bfb4.png?generation=1600439426235980\&alt=media)

* To delete a data row, in the checkbox column,

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2D9YVpzigjM3Ym9I_Q%2F-M2DFw8jI4pBVk6E9x4Q%2FDelete%20row-%20attribute.png?alt=media\&token=0e71a050-297e-42dd-9c1f-ef719586df8b)

a. Select the row(s) that you want to delete and click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHvebuFmgEPSTubejja%2F-MHvfdc-1JoqNltPHb8S%2Fdelete_activity%2520streams.png?alt=media&#x26;token=b1509d38-0617-4d93-8961-1533b4a20f90" alt="" data-size="line"> .

b. Click **Delete**. The selected row(s) are deleted.

* To refresh the table, in the **Attributes** tab, in the actions bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2D9YVpzigjM3Ym9I_Q%2F-M2DHP0xIst2ZzNToUrA%2FRefresh%20datasources.png?alt=media\&token=a9bc18c8-8a22-4ec8-90b8-46ba4f29b618) .
