# SetAsset

> Enables you to update the value of an indicated [asset](https://docs.uipath.com/orchestrator/standalone/2023.4/user-guide/about-assets), which is already available in Orchestrator, be it a global or a Per Robot asset. Note that to execute this method, [the Robot role](https://docs.uipath.com/orchestrator/standalone/2023.4/user-guide/default-roles#robot-role) needs to have **Edit** permissions on assets. When the `UiPath.Core.Activities.SetAsset` is triggered, the authentication context of the Robot under which it runs is being used.

Enables you to update the value of an indicated [asset](https://docs.uipath.com/orchestrator/standalone/2023.4/user-guide/about-assets), which is already available in Orchestrator, be it a global or a Per Robot asset. Note that to execute this method, [the Robot role](https://docs.uipath.com/orchestrator/standalone/2023.4/user-guide/default-roles#robot-role) needs to have **Edit** permissions on assets. When the `UiPath.Core.Activities.SetAsset` is triggered, the authentication context of the Robot under which it runs is being used.

For more information about Global and Per Robot assets, please see steps 5 and 6 from [this page](https://docs.uipath.com/orchestrator/standalone/2023.4/user-guide/managing-assets-in-orchestrator).

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## Overloads

|  |  |
| --- | --- |
| `SetAsset(Object, String)` | Update the value of an indicated asset. |
| `SetAsset(Object, String, String)` | Update the value of an indicated asset, from a specified Orchestrator folder. |
| `SetAsset(Object, String, String, Int32)` | Update the value of an indicated asset, from a specified Orchestrator folder, and with `TimeoutMS` configured. |

## `SetAsset(Object, String)`

Update the value of an indicated asset, from a specified Orchestrator folder, and with `TimeoutMS` configured.

```
void SetAsset(
    Object value,
    string assetName
)
```

`value` [Object](https://learn.microsoft.com/dotnet/api/system.object) : The new value of the asset. The type needs to coincide with the type of asset you want to update.

`assetName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the asset to be updated.

## `SetAsset(Object, String, String)`

Update the value of an indicated asset, from a specified Orchestrator folder.

```
void SetAsset(
    Object value,
    string assetName,
    string folderPath
)
```

`value` [Object](https://learn.microsoft.com/dotnet/api/system.object) : The new value of the asset. The type needs to coincide with the type of asset you want to update.

`assetName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the asset to be updated.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : [The path of the folder](https://docs.uipath.com/orchestrator/docs/folders) where the asset is located, if different from the folder where the process is running. This field only supports string values, with `/` as the separator to indicate subfolders. For example `"Finance/Accounts Payable"`.

## `SetAsset(Object, String, String, Int32)`

Update the value of an indicated asset, from a specified Orchestrator folder, and with `TimeoutMS` configured.

```
void SetAsset(
    Object value,
    string assetName,
    string folderPath,
    int timeoutMS
)
```

`value` [Object](https://learn.microsoft.com/dotnet/api/system.object) : The new value of the asset. The type needs to coincide with the type of asset you want to update.

`assetName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the asset to be updated.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : [The path of the folder](https://docs.uipath.com/orchestrator/docs/folders) where the asset is located, if different from the folder where the process is running. This field only supports string values, with `/` as the separator to indicate subfolders. For example `"Finance/Accounts Payable"`.

`timeoutMS` [Int32](https://learn.microsoft.com/dotnet/api/system.int32) : Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).
