InstanceNode setProperty function not updating as expected

When I try to set text property as below, I don’t get any error and value is also not updated.

property =“Minorvalue#410:36”;
instanceNode.setProperty({property:“Sample Text”});

But when I do the same like below I am able to set the value

instanceNode.setProperty({“Minorvalue#410:36”:“Sample Text”});

“property” is string so I couldn’t figure out what I am missing here :frowning:

In order for JavaScript to understand that you are passing a variable as an object key, you must follow its syntax, and specify as [key].

1 Like

Thanks @tank666 .

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.