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 <[email protected]>:

> Hi Sergio,
>
> > On 17 Oct 2017, at 10:54, Sergio Fernández <[email protected]>
> 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
> [email protected]
> http://lists.genieacs.com/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to