# Add custom property in UaVariableNode

**URL:** <https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616>\
**Category:** Module Development\
**Tags:** ignition81\
**Created:** [November 14, 2024, 3:36pm UTC](https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616 "2024-11-14T15:36:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano\_Morini](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stefano\_Morini](https://forum.inductiveautomation.com/u/Stefano_Morini)\
**Post date:** [November 14, 2024, 3:36pm UTC](https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616/1 "2024-11-14T15:36:32Z")

</div>

Hi,

I'm creating a new node/tag in this way.

```python
        UaVariableNode node = UaVariableNode.builder(getNodeContext())
                .setNodeId(m_deviceContext.nodeId(parentName + "/" + tagName))
                .setBrowseName(m_deviceContext.qualifiedName(tagName))
                .setDisplayName(new LocalizedText(tagName))
                .setDataType(nodeType)
                .setTypeDefinition(Identifiers.BaseDataVariableType)
                .setAccessLevel(accessLevel)
                .setUserAccessLevel(userAccessLevel)
                .build();

```

In this node I'm trying to add a new custom property, as I can do in the designer.

 ![Screenshot 2024-11-14 alle 16.27.00](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5ffacb80934fd85b8967a2c3faacfbb96b89dc19.png)

Is it possibile code side?  
Because I'm trying with this code

```python
        final QualifiedProperty<String> fooProperty =
                new QualifiedProperty<>(
                        getNodeContext().getNamespaceTable().getUri(node.getNodeId().getNamespaceIndex()),
                        "foo",
                        Identifiers.String.expanded(),
                        ValueRanks.Scalar,
                        String.class
                );

        node.setProperty(fooProperty, "value");

```

but I can't see the foo custom property in the tag in designer.

 ![Screenshot 2024-11-14 alle 16.25.22](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0fe464607fe417697d6cec206e4c3d0a58f8816b.png)

Is this the correct way to do that?

How can I read the value the user fill in the new custom property...is this way is possibile.

Thanks,  
Stefano

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 14, 2024, 3:40pm UTC](https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616/2 "2024-11-14T15:40:33Z")

</div>

Ignition tag properties have nothing to do with the OPC UA concept of properties. There is no link between them.

An OPC UA PropertyNode is just another Node that will show up when browsing in the OPC browser, underneath whatever Node you add it to, if done correctly.

---

<div class="post-metadata">

**Author:** ![Stefano\_Morini](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stefano\_Morini](https://forum.inductiveautomation.com/u/Stefano_Morini)\
**Post date:** [November 14, 2024, 4:02pm UTC](https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616/3 "2024-11-14T16:02:21Z")

</div>

Ok, there is no way to see in the designer a property added in node.  
But there is a way to use in code the custom properties added in the designer?

Thanks,  
Stefano

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 14, 2024, 4:06pm UTC](https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616/4 "2024-11-14T16:06:06Z")

</div>

You can read the value of those properties like any other property by calling `TagManager::readAsync`, but you have to be able to construct the the necessary tag path, and there's no link between Ignition tags and whatever you might be doing down at the OPC UA level (other than OPC UA NodeId == OPC Item Path of an Ignition OPC tag).

> **[TagManager](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.44/com/inductiveautomation/ignition/common/tags/model/TagManager.html#readAsync(java.util.List))**
>
> declaration: package: com.inductiveautomation.ignition.common.tags.model, interface: TagManager

---

<div class="post-metadata">

**Author:** ![Stefano\_Morini](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stefano\_Morini](https://forum.inductiveautomation.com/u/Stefano_Morini)\
**Post date:** [November 14, 2024, 4:20pm UTC](https://forum.inductiveautomation.com/t/add-custom-property-in-uavariablenode/98616/5 "2024-11-14T16:20:46Z")

</div>

Thanks.

ok . maybe I have the wrong approach.

I have to create a TCP driver module that read a specific address and put the 4 byte result as int in the node tag.  
But I don't know the address at development time in module. The Designer developer have to give me it when he add tehe node tag to get the value.

The only way I found for the moment is to add a folder with 2 node the Address in RW and the Value in RO.

Are there other ways?
