# GenieACS 1.2.9 Preset Add Tag

**URL:** <https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684>\
**Category:** Uncategorized\
**Created:** [July 4, 2024, 8:25am UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684 "2024-07-04T08:25:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kliwer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/kliwer/32/1899_2.png) [@Kliwer](https://forum.genieacs.com/u/Kliwer)\
**Post date:** [July 4, 2024, 8:25am UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/1 "2024-07-04T08:25:56Z")

</div>

Hi.  
Ho do I add tag in preset? All documentation or old post refer to older GUI.  
I tried to select “tag” in “Provision” and then in “Arguments” I put:  
`UpToDate = "true"`  
but I get “Invalid arguments” in Faults page.  
What should correct arguments look like?

---

<div class="post-metadata">

**Author:** ![harilam](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@harilam](https://forum.genieacs.com/u/harilam)\
**Post date:** [July 5, 2024, 4:01pm UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/2 "2024-07-05T16:01:45Z")

</div>

You can find the answer here  
[https://docs.genieacs.com/en/latest/provisions.html#tags](https://docs.genieacs.com/en/latest/provisions.html#tags)

---

<div class="post-metadata">

**Author:** ![Kliwer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/kliwer/32/1899_2.png) [@Kliwer](https://forum.genieacs.com/u/Kliwer)\
**Post date:** [July 8, 2024, 5:51am UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/3 "2024-07-08T05:51:14Z")

</div>

Nope, I won’t find the answer there.  
I know how to add tag in provision.  
I am asking how to do that in PRESET.

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [July 8, 2024, 4:59pm UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/4 "2024-07-08T16:59:25Z")

</div>

To the best of my knowledge, that use case is no longer supported. As of v1.2, presets are used to kick off provision scripts only.

---

<div class="post-metadata">

**Author:** ![Kliwer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/kliwer/32/1899_2.png) [@Kliwer](https://forum.genieacs.com/u/Kliwer)\
**Post date:** [July 9, 2024, 7:04am UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/5 "2024-07-09T07:04:30Z")

</div>

Looking through code at github there is a function in file default-provisions.ts:

```auto
export function tag(
  sessionContext: SessionContext,
  provision: (string | number | boolean)[],
  declarations: Declaration[],
): boolean {
  if (
    provision.length !== 3 ||
    typeof provision[1] !== "string" ||
    typeof provision[2] !== "boolean"
  )
    throw new Error("Invalid arguments");

  declarations.push({
    path: Path.parse(`Tags.${provision[1]}`),
    pathGet: 1,
    pathSet: null,
    attrGet: { value: 1 },
    attrSet: { value: [provision[2]] },
    defer: true,
  });

  return true;
}

```

Question is, how to type arguments in preset to be correctly seen here - one line, one argument? If so, how to do that when “Enter” key closes edit window?

---

<div class="post-metadata">

**Author:** ![andreuntiedt](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@andreuntiedt](https://forum.genieacs.com/u/andreuntiedt)\
**Post date:** [July 9, 2024, 10:09pm UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/6 "2024-07-09T22:09:15Z")

</div>

DeviceID.Manufacturer = “MikroTik” AND Tags.UpgradeFirmware = true

---

<div class="post-metadata">

**Author:** ![Kliwer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/kliwer/32/1899_2.png) [@Kliwer](https://forum.genieacs.com/u/Kliwer)\
**Post date:** [July 10, 2024, 6:07am UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/7 "2024-07-10T06:07:10Z")

</div>

That looks like precondition.  
I did not find yet where and how function “tag” is called but what I understand from this code is that this function requires 3 arguments:

- unknown
- tag name
- tag value  
I tried:  
“Upgrade”  
“Upgrade”=true  
0,“Upgrade”,true  
and similar variations, none worked - always “Invalid arguments”

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [July 10, 2026, 6:20pm UTC](https://forum.genieacs.com/t/genieacs-1-2-9-preset-add-tag/5684/9 "2026-07-10T18:20:23Z")

</div>


