# Function: setActivity()

```ts
function setActivity(
   node, 
   space, 
   on, 
   state, 
   label?
): Promise<
  | NodeRecord<unknown>
| null>;
```

Defined in: [packages/core/src/schemas/automations.ts:210](https://github.com/leifriksheim/minca/blob/main/core/src/schemas/automations.ts#L210)

Says where this account's work on a record stands: its one `std.activity`
about it, made or changed. Without a label, the one it had stays. Null
where the space keeps no `std.activity`.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `node` | [`P2PNode`](https://minca.dev/api/core/interfaces/P2PNode.md) |
| `space` | `string` |
| `on` | `string` |
| `state` | [`ActivityState`](https://minca.dev/api/schemas/type-aliases/ActivityState.md) |
| `label?` | `string` |

## Returns

`Promise`\<
  \| [`NodeRecord`](https://minca.dev/api/core/interfaces/NodeRecord.md)\<`unknown`\>
  \| `null`\>
