Update correct instances

Sergio Fernández sergio19932 at gmail.com
Tue Oct 17 05:09:54 EDT 2017


Hi, thank you, Cas de Reuver.

The value itself is undefined if you call it like an array (as wanid[0]).
The problem is how to ask to GenieACS which are the Instances ID.
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"

Anyway, thank you very much for the time spent.

Sergio Fernández Rubio - https://www.linkedin.com/in/sergiofdz/
(+34) 687 016 994
CEO @ ACSdesk
https://acsdesk.com

2017-10-17 10:58 GMT+02:00 Cas de Reuver <cas at reuver.co>:

> Hi Sergio,
>
> > On 17 Oct 2017, at 10:54, Sergio Fernández <sergio19932 at gmail.com>
> wrote:
> > And when trying to
> >
> > let wanid = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*",
> {value: 1}).value[0];
> > log(wanid);
> >
> > logging an error: faultMessage="Cannot read property '0' of undefined"
>
> Try the following:
>
> let wanid = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*",
> {value: 1});
> console.log(wanid[0]);
>
> According to the wiki (https://github.com/zaidka/genieacs/wiki/Virtual-
> Parameters), getting the value the way you want works like this:
>
> console.log(wanid[0].value[0]);
>
> --
> Cas de Reuver
> http://cas.reuver.co
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20171017/10b54023/attachment.html>


More information about the Users mailing list