# Passing nodeid as string on system.opcua.callMethod

**URL:** <https://forum.inductiveautomation.com/t/passing-nodeid-as-string-on-system-opcua-callmethod/97085>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 10, 2024, 2:41pm UTC](https://forum.inductiveautomation.com/t/passing-nodeid-as-string-on-system-opcua-callmethod/97085 "2024-10-10T14:41:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Iglesias](https://avatars.discourse-cdn.com/v4/letter/g/e95f7d/32.png) [@Gabriel\_Iglesias](https://forum.inductiveautomation.com/u/Gabriel_Iglesias)\
**Post date:** [October 10, 2024, 2:41pm UTC](https://forum.inductiveautomation.com/t/passing-nodeid-as-string-on-system-opcua-callmethod/97085/1 "2024-10-10T14:41:49Z")

</div>

Hi. I'm trying to call a method using system.opcua.CallMethod like the following code:

```python
	output = system.opcua.callMethod(
        "OPC_Pedidos",
        "ns=2;s=/Pedidos",
        "ns=2;s=/Pedidos/BasicReport",
        []
    )

```

When I check output[2], I obtain an empty list. However, when I call the method with the following syntax:

```python
	output = system.opcua.callMethod(
        "OPC_Pedidos",
        "ns=2;i=1",
        "ns=2;i=28",
        []
    )

```

The result is what I expected. In the OPC Browser, my methods are organized like this:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/db75b2f7c2174646c52a094a39434e47c834e38b.png)

Is there any errors in my syntax on the first code? It would be useful to call the node via a string, because when creating or eliminating methods, the ids change and I need to change the id on the script.

Thanks in advance, Gabriel.

---

<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:** [October 10, 2024, 2:56pm UTC](https://forum.inductiveautomation.com/t/passing-nodeid-as-string-on-system-opcua-callmethod/97085/2 "2024-10-10T14:56:03Z")

</div>

Those String-based NodeIds are only valid if they are the NodeIds used by the server. You cannot just concatenate browse path and assume it's a valid NodeId.
