# Problems with Tags

**URL:** <https://forum.genieacs.com/t/problems-with-tags/3888>\
**Category:** Uncategorized\
**Created:** [April 25, 2023, 7:08am UTC](https://forum.genieacs.com/t/problems-with-tags/3888 "2023-04-25T07:08:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vang1804](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/vang1804/32/1003_2.png) [@vang1804](https://forum.genieacs.com/u/vang1804)\
**Post date:** [April 25, 2023, 7:08am UTC](https://forum.genieacs.com/t/problems-with-tags/3888/1 "2023-04-25T07:08:37Z")

</div>

Hello everyone!

I have been trying to add a Tag with the “agentcircuitid” coming from Radius. I have managed to get the right string from the Radius, but when I am trying to add it through the provision script I get the following error message…

Channel has faulted; channel=“default” retries=0 faultCode=“script.Error” faultMessage=“Invalid parameter path”

When I add it from the GUI everything works perfect :(. Should I escape it of somethink??

The cirtuitID string is “RC\_02B01\_D\_HUA\_02C02D eth 0/1/0/25:835:Vang-Prasino”.

Thank in advance!!

---

<div class="post-metadata">

**Author:** ![Miko](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Miko](https://forum.genieacs.com/u/Miko)\
**Post date:** [April 25, 2023, 4:43pm UTC](https://forum.genieacs.com/t/problems-with-tags/3888/2 "2023-04-25T16:43:31Z")

</div>

Hello,

Can you send us the example of the provision script ?

Your log looks like a problem with the “path” parameter

`{path: XXXX}`

You need to verify the order of the object

---

<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:** [April 25, 2023, 5:39pm UTC](https://forum.genieacs.com/t/problems-with-tags/3888/3 "2023-04-25T17:39:06Z")

</div>

To add a tag use this syntax: `declare("Tags.SomeTagName", null, {value: true});` to remove, use `declare("Tags.SomeTagName", null, {value: false});`

Tags are not key/value pairs. It sounds like you might want to create a virtual parameter instead. This allows you to store arbitrary data for a device.

This v-param will allow you to read/write arbitrary data.

```auto
let value;

if ("value" in args[1]) {
    // Set declared value
    value = args[1].value;
} else if ("value" in args[3]) {
    // No declared value, keep current value
    value = args[3].value;
} else {
    // No current value, use default
    value = ['', 'xsd:string'];
}

return {writable: true, value: value};

```

---

<div class="post-metadata">

**Author:** ![vang1804](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/vang1804/32/1003_2.png) [@vang1804](https://forum.genieacs.com/u/vang1804)\
**Post date:** [April 26, 2023, 7:22am UTC](https://forum.genieacs.com/t/problems-with-tags/3888/4 "2023-04-26T07:22:35Z")

</div>

Hello akcoder!!!

You are right! I haven’t though about virtual parameters!  
I have done al ot of controlling through tags and my mind was stuck! I will try it this way!

Many thanks!
