> ## Content Index
> Fetch the complete content index at: https://ptarmiganlabs.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Bulk update of Qlik Sense task custom properties
- URL: https://ptarmiganlabs.com/bulk-update-of-qlik-sense-task-custom-properties/
- Published: 2023-02-16T19:07:48.000Z
- Updated: 2023-02-16T19:20:49.000Z
- Description: Setting custom properties for dozens or hundreds of Qlik Sense reload tasks can easily take hours. Ctrl-Q has a command that automate this and also remove the risk for manual errors.
- Author: Göran Sander
- Tags: Ctrl-Q, SenseOps, Qlik Sense, #Import 2025-03-29 20:52

The title says it all.  
But as we'll see there are a few things to consider when doing bulk updates of reload tasks' custom properties.

Let's say you have to set a custom property on 200 reload tasks in client-managed [Qlik Sense](https://www.qlik.com/us/products/qlik-sense?ref=ptarmiganlabs.com). The Qlik Management Console (QMC) will not let you select multiple reload tasks and update them in one go:

![](https://ptarmiganlabs.com/content/images/2023/02/qlik-sense-qmc-multiple-task-edit-1.png)

So what are the options?

You can use Adam Haydon's excellent [Qlik CLI Windows](https://adamhaydon.com/Qlik-Cli-Windows/?ref=ptarmiganlabs.com) tool. You can then create a PowerShell script that will first get all reload tasks matching some criteria, then update one or more custom properties of those tasks.

## Ctrl-Q helping out

The open source, cross platform [Ctrl-Q ](https://github.com/ptarmiganlabs/ctrl-q?ref=ptarmiganlabs.com)tool tries to simplify things even more.  
A single command will do exactly what's described above, with some extra features thrown in too (for example, it's possible to *replace* or *append* values to custom properties).

Now, let's do a bulk update of reload tasks:

- All tasks tagged "Butler 5.0 demo" should be updated.
- A custom property "ReportMonth" should receive two values, "2023 Jan" and "2023 Feb".
- Append the new values to any existing ones, rather than replacing any existing values.
- Sense certificates in the "cert" subdirectory will be used to authenticate with Sense, logging in as user "Internal/sa\_api".  
Note: When authenticating using certificates you can impersonate any user!

```powershell
.\ctrl-q.exe task-custom-property-set `
--auth-type cert `
--host 192.168.100.109 `
--auth-cert-file ".\cert\client.pem" `
--auth-cert-key-file ".\cert\client_key.pem" `
--auth-user-dir Internal `
--auth-user-id sa_api `
--custom-property-name ReportMonth `
--custom-property-value "2023 Jan" "2023 Feb" `
--update-mode append `
--task-tag "Butler 5.0 demo"

```

```powershell
2023-02-16T17:48:59.319Z info: -----------------------------------------------------------
2023-02-16T17:48:59.319Z info: | Ctrl-Q
2023-02-16T17:48:59.335Z info: |
2023-02-16T17:48:59.335Z info: | Version      : 3.5.0
2023-02-16T17:48:59.335Z info: | Log level    : info
2023-02-16T17:48:59.335Z info: |
2023-02-16T17:48:59.351Z info: | Command      : task-custom-property-set
2023-02-16T17:48:59.351Z info: |              : update a custom property of one or more tasks
2023-02-16T17:48:59.351Z info: |
2023-02-16T17:48:59.351Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-02-16T17:48:59.351Z info: |
2023-02-16T17:48:59.351Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-02-16T17:48:59.351Z info: ----------------------------------------------------------
2023-02-16T17:48:59.351Z info:
2023-02-16T17:48:59.445Z error: Can't find custom property "ReportMonth". Exiting.

```

Ahh, Ctrl-Q has detected that the custom property "ReportMonth" does not exist. Let's add it and *one* of the two values ("2023 Jan"), then try again.

![](https://ptarmiganlabs.com/content/images/2023/02/qlik-sense-cp-one-value-1.png)

Custom property with ONE allowed value

```powershell
2023-02-16T17:52:49.006Z info: -----------------------------------------------------------
2023-02-16T17:52:49.006Z info: | Ctrl-Q
2023-02-16T17:52:49.022Z info: |
2023-02-16T17:52:49.022Z info: | Version      : 3.5.0
2023-02-16T17:52:49.022Z info: | Log level    : info
2023-02-16T17:52:49.022Z info: |
2023-02-16T17:52:49.022Z info: | Command      : task-custom-property-set
2023-02-16T17:52:49.022Z info: |              : update a custom property of one or more tasks
2023-02-16T17:52:49.022Z info: |
2023-02-16T17:52:49.022Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-02-16T17:52:49.022Z info: |
2023-02-16T17:52:49.022Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-02-16T17:52:49.022Z info: ----------------------------------------------------------
2023-02-16T17:52:49.022Z info:
2023-02-16T17:52:49.162Z error: Value "2023 Feb" is not valid for custom property "ReportMonth". Exiting.

```

Ctrl-Q detects that "2023 Feb" is not a valid value for the "ReportMonth" custom property. Nice.   
Let's add "2023 Feb" as a valid value and try again:

![](https://ptarmiganlabs.com/content/images/2023/02/qlik-sense-cp-two-values-1.png)

Custom property with TWO allowed values

```powershell
2023-02-16T17:54:53.959Z info: -----------------------------------------------------------
2023-02-16T17:54:53.959Z info: | Ctrl-Q
2023-02-16T17:54:53.959Z info: |
2023-02-16T17:54:53.959Z info: | Version      : 3.5.0
2023-02-16T17:54:53.959Z info: | Log level    : info
2023-02-16T17:54:53.959Z info: |
2023-02-16T17:54:53.959Z info: | Command      : task-custom-property-set
2023-02-16T17:54:53.959Z info: |              : update a custom property of one or more tasks
2023-02-16T17:54:53.959Z info: |
2023-02-16T17:54:53.959Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-02-16T17:54:53.959Z info: |
2023-02-16T17:54:53.959Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-02-16T17:54:53.959Z info: ----------------------------------------------------------
2023-02-16T17:54:53.959Z info:
2023-02-16T17:54:54.178Z info: Number of tasks that will be updated: 6
2023-02-16T17:54:54.178Z info:
2023-02-16T17:54:54.178Z info: -----------------------------------------------------------
2023-02-16T17:54:54.178Z info: Processing task "Reload task of Test data - NYC parking tickets" with ID=09b3c78f-04dd-45e3-a4bf-1b074d6572fa
2023-02-16T17:54:54.178Z info: Starting updating custom property "ReportMonth" of task "Reload task of Test data - NYC parking tickets" with ID=09b3c78f-04dd-45e3-a4bf-1b074d6572fa
2023-02-16T17:54:54.396Z info:    ...Custom property "ReportMonth" on task "Reload task of Test data - NYC parking tickets" successfully updated.
2023-02-16T17:54:54.396Z info:
2023-02-16T17:54:54.396Z info: -----------------------------------------------------------
2023-02-16T17:54:54.396Z info: Processing task "Reload of Test failing reloads 1 (emojis supported! 🤪)" with ID=22b106a8-e7ed-4466-b700-014f060bef16
2023-02-16T17:54:54.396Z info: Starting updating custom property "ReportMonth" of task "Reload of Test failing reloads 1 (emojis supported! 🤪)" with ID=22b106a8-e7ed-4466-b700-014f060bef16
2023-02-16T17:54:54.553Z info:    ...Custom property "ReportMonth" on task "Reload of Test failing reloads 1 (emojis supported! 🤪)" successfully updated.
2023-02-16T17:54:54.553Z info:
2023-02-16T17:54:54.553Z info: -----------------------------------------------------------
2023-02-16T17:54:54.553Z info: Processing task "Reload task of App2" with ID=7552d9fc-d1bb-4975-9a38-18357de531ea
2023-02-16T17:54:54.553Z info: Starting updating custom property "ReportMonth" of task "Reload task of App2" with ID=7552d9fc-d1bb-4975-9a38-18357de531ea
2023-02-16T17:54:54.662Z info:    ...Custom property "ReportMonth" on task "Reload task of App2" successfully updated.
2023-02-16T17:54:54.662Z info:
2023-02-16T17:54:54.662Z info: -----------------------------------------------------------
2023-02-16T17:54:54.662Z info: Processing task "Manually triggered reload of App1 🏆" with ID=b37f8034-faee-4e9b-bbca-5aba0cdf5df2
2023-02-16T17:54:54.662Z info: Starting updating custom property "ReportMonth" of task "Manually triggered reload of App1 🏆" with ID=b37f8034-faee-4e9b-bbca-5aba0cdf5df2
2023-02-16T17:54:54.803Z info:    ...Custom property "ReportMonth" on task "Manually triggered reload of App1 🏆" successfully updated.
2023-02-16T17:54:54.803Z info:
2023-02-16T17:54:54.803Z info: -----------------------------------------------------------
2023-02-16T17:54:54.803Z info: Processing task "Reload task of App1" with ID=e3b27f50-b1c0-4879-88fc-c7cdd9c1cf3e
2023-02-16T17:54:54.803Z info: Starting updating custom property "ReportMonth" of task "Reload task of App1" with ID=e3b27f50-b1c0-4879-88fc-c7cdd9c1cf3e
2023-02-16T17:54:54.913Z info:    ...Custom property "ReportMonth" on task "Reload task of App1" successfully updated.
2023-02-16T17:54:54.913Z info:
2023-02-16T17:54:54.913Z info: -----------------------------------------------------------
2023-02-16T17:54:54.913Z info: Processing task "Reload task of App3" with ID=fb0f317d-da91-4b86-aafa-0174ae1e8c8f
2023-02-16T17:54:54.913Z info: Starting updating custom property "ReportMonth" of task "Reload task of App3" with ID=fb0f317d-da91-4b86-aafa-0174ae1e8c8f
2023-02-16T17:54:55.115Z info:    ...Custom property "ReportMonth" on task "Reload task of App3" successfully updated.

```

Great, six reload tasks updated, as expected. 

## Replacing custom properties

At this point we have six reload tasks that each have "2023 Jan" and "2023 Feb" set in the "ReportMonth" custom property.

![](https://ptarmiganlabs.com/content/images/2023/02/qlik-sense-task-cp-two-values-set-1.png)

Two values set for custom property of a reload task

Let's say we want to change this for two of the tasks, so they only have the "2023 Jan" value.

We can run ctrl-Q using the --task-id option to specify which tasks to modify and the --update-mode option to tell Ctrl-Q to replace rather than append values:

```powershell
.\ctrl-q.exe task-custom-property-set `
>> --auth-type cert `
>> --host 192.168.100.109 `
>> --auth-cert-file ".\cert\client.pem" `
>> --auth-cert-key-file ".\cert\client_key.pem" `
>> --auth-user-dir Internal `
>> --auth-user-id sa_api `
>> --custom-property-name ReportMonth `
>> --custom-property-value "2023 Jan" `
>> --update-mode replace `
>> --task-id e3b27f50-b1c0-4879-88fc-c7cdd9c1cf3e 7552d9fc-d1bb-4975-9a38-18357de531ea

```

Note how we have to decide for each task if the custom property values should be replaced:

```
2023-02-16T18:02:31.581Z info: -----------------------------------------------------------
2023-02-16T18:02:31.581Z info: | Ctrl-Q
2023-02-16T18:02:31.581Z info: |
2023-02-16T18:02:31.581Z info: | Version      : 3.5.0
2023-02-16T18:02:31.581Z info: | Log level    : info
2023-02-16T18:02:31.581Z info: |
2023-02-16T18:02:31.581Z info: | Command      : task-custom-property-set
2023-02-16T18:02:31.581Z info: |              : update a custom property of one or more tasks
2023-02-16T18:02:31.581Z info: |
2023-02-16T18:02:31.581Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-02-16T18:02:31.581Z info: |
2023-02-16T18:02:31.581Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-02-16T18:02:31.581Z info: ----------------------------------------------------------
2023-02-16T18:02:31.581Z info:
2023-02-16T18:02:31.706Z info: Number of tasks that will be updated: 2
2023-02-16T18:02:31.706Z info:
2023-02-16T18:02:31.706Z info: -----------------------------------------------------------
2023-02-16T18:02:31.706Z info: Processing task "Reload task of App2" with ID=7552d9fc-d1bb-4975-9a38-18357de531ea
2023-02-16T18:02:31.706Z info: Starting updating custom property "ReportMonth" of task "Reload task of App2" with ID=7552d9fc-d1bb-4975-9a38-18357de531ea
2023-02-16T18:02:31.706Z info:
                               Replace current values in custom property "ReportMonth" with new ones? (y/n) y
2023-02-16T18:02:36.706Z info:
2023-02-16T18:02:36.815Z info:    ...Custom property "ReportMonth" on task "Reload task of App2" successfully updated.
2023-02-16T18:02:36.815Z info:
2023-02-16T18:02:36.815Z info: -----------------------------------------------------------
2023-02-16T18:02:36.815Z info: Processing task "Reload task of App1" with ID=e3b27f50-b1c0-4879-88fc-c7cdd9c1cf3e
2023-02-16T18:02:36.815Z info: Starting updating custom property "ReportMonth" of task "Reload task of App1" with ID=e3b27f50-b1c0-4879-88fc-c7cdd9c1cf3e
2023-02-16T18:02:36.815Z info:
                               Replace current values in custom property "ReportMonth" with new ones? (y/n) y
2023-02-16T18:02:37.487Z info:
2023-02-16T18:02:37.581Z info:    ...Custom property "ReportMonth" on task "Reload task of App1" successfully updated.

```

![](https://ptarmiganlabs.com/content/images/2023/02/qlik-sense-task-cp-one-value-set-1.png)

One value set for custom property of reload task

If we add the —overwrite option the per-task replace question will be skipped and the tasks updated without any per-task approvals.

## Tips & tricks

- If you want to update custom properties on **all** reload tasks that's easy: Just don't use the --task-id or --task-tag options.
- Before updating tasks it can be a good idea to do a dry run, testing what changed will be applied (without actually applying them!). This is done with the --dry-run option.