<div dir="ltr">Hi, thank you, Cas de Reuver.<br><br>The value itself is undefined if you call it like an array (as <span style="font-size:12.8px">wanid[0]</span>). The problem is how to ask to GenieACS which are the Instances ID. <br>And the "log()" function is the function used inside Provisions. If you use "console.log()" this is the error I receive: faultCode="script.ReferenceError" faultMessage="console is not defined"<br><br>Anyway, thank you very much for the time spent.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sergio Fernández Rubio - <a href="https://www.linkedin.com/in/sergiofdz/" target="_blank">https://www.linkedin.com/in/sergiofdz/<br></a></div><div dir="ltr"><div><span>(+34) 687 016 994</span><br>CEO @ ACSdesk<br></div><div><a href="https://acsdesk.com" target="_blank">https://acsdesk.com</a><br></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-10-17 10:58 GMT+02:00 Cas de Reuver <span dir="ltr"><<a href="mailto:cas@reuver.co" target="_blank">cas@reuver.co</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sergio,<br>
<span class=""><br>
> On 17 Oct 2017, at 10:54, Sergio Fernández <<a href="mailto:sergio19932@gmail.com">sergio19932@gmail.com</a>> wrote:<br>
> And when trying to<br>
><br>
> let wanid = declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.*", {value: 1}).value[0];<br>
> log(wanid);<br>
><br>
> logging an error: faultMessage="Cannot read property '0' of undefined"<br>
<br>
</span>Try the following:<br>
<span class=""><br>
let wanid = declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.*", {value: 1});<br>
</span>console.log(wanid[0]);<br>
<br>
According to the wiki (<a href="https://github.com/zaidka/genieacs/wiki/Virtual-Parameters" rel="noreferrer" target="_blank">https://github.com/zaidka/<wbr>genieacs/wiki/Virtual-<wbr>Parameters</a>), getting the value the way you want works like this:<br>
<br>
console.log(wanid[0].value[0])<wbr>;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Cas de Reuver<br>
<a href="http://cas.reuver.co" rel="noreferrer" target="_blank">http://cas.reuver.co</a><br>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/<wbr>mailman/listinfo/users</a><br>
</font></span></blockquote></div><br></div>