# Approval Attribute

The **ApprovalAttribute** is used to approve a object by a particular user or by a user group. To approve an object, the user needs to provide their Aligned Elements login credentials.

## Example

The following example creates an object to approve that "This Document Object is completed and can be closed". After it has been approved, the user and the date of approval is displayed.

### XML

```xml
<ApprovalAttribute Name="Closing Confirmation"
  ObjectToApprove="This Document Object is completed and can be closed.">
</ApprovalAttribute>
```

### Appearance

#### Before approval

<figure><img src="https://1513434666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTuDV9CT1fe_nPqwVF4%2Fuploads%2FBgxG3B1k3V3eQAPpvO0B%2Fimage.png?alt=media&#x26;token=a64e0180-d8a8-4904-8d62-01b35488e3f7" alt=""><figcaption></figcaption></figure>

#### After the object has been approved

<figure><img src="https://1513434666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTuDV9CT1fe_nPqwVF4%2Fuploads%2FU9d5PJFtC8PW9mkiYHK2%2Fimage.png?alt=media&#x26;token=305cf773-d4f3-49d9-b389-8b1fdf7c3f12" alt=""><figcaption></figcaption></figure>

## XML Elements

#### UserGroups

The approver can be extended to also include user groups, in addition to single users..

```xml
<ApprovalAttribute Name="Closing Confirmation"
ObjectToApprove="This Document Object is completed and can be closed.">
  <UserGroups>
    <UserGroup UserGroupName="Testers" />
  </UserGroups>
</ApprovalAttribute>
```

## XML Attributes

#### ObjectToApprove (required)

The object to approve. The value is a simple text.

#### AskForWorkRole

Indicates if a work role must be provided to approve. The Default value is false.

```xml
<ApprovalAttribute Name="Closing Confirmation"
  ObjectToApprove="This Document Object is completed and can be closed."
  AskForWorkRole="true">
</ApprovalAttribute>
```

#### AskForLocation

Indicates if a location must be provided to approve. The Default value is false.

```xml
<ApprovalAttribute Name="Closing Confirmation"
  ObjectToApprove="This Document Object is completed and can be closed."
  AskForLocation="true">
</ApprovalAttribute>
```

#### AskForComment

Indicates if a comment must be provided to approve. The Default value is false.

```xml
<ApprovalAttribute Name="Closing Confirmation"
  ObjectToApprove="This Document Object is completed and can be closed."
  AskForComment="true">
</ApprovalAttribute>
```
