Subnet IF/Then

(imported topic written by Heath-TitanIT)

I am trying to create an IF/THEN that uses a Relevance script to save, if greater than this subnet, uninstall this; else, uninstall this.

Currently I am trying to make the following query work:

(subnet addresses whose (it as sting is greater than “10.4.0.0”) of ip interfaces of

network)

but it continuously throws the following error: “the cast ’ as string’ is not defined”

Am I just missing something here?

(imported comment written by Heath-TitanIT)

Anyone? I am still having problems making this work.

(imported comment written by jgstew)

(subnet addresses whose(((it as string) of it) is greater than “10.4.0.0”) of ip interfaces of network)

The issue is that “Subnet Addresses” returns a plural object, so you cannot operate on it directly with “as string”. This: ((it as string) of it) seems equivalent, but it is not because it does the “as string” operation to each of the ipv4 address objects individually instead of as a whole.

also, this may actually work better:

(subnet addresses whose(((it as string as version) of it) is greater than “10.4.0.0” as version) of ip interfaces of network)

(imported comment written by Heath-TitanIT)

Thanks you, I will test this this afternoon and update when I have my findings!