Search a Record In data-group

Hello,

I don’t find the good syntax (v11).

I want to search a record on Data-group and init a variable

If my data-group contains only one Record it’s ok by the command :

set var [findclass “ForbiddenUrl” [class get VIP_Internet] " "]

log local0. “$var”

Result

==> redirect http://website.fr

My data-group

ltm data-group internal /Common/VIP_Internet {

records {

“ForbiddenUrl redirect http://website.fr” { }

}

type string

}

But if the data-group contains 2 (or much) records the command don"t work.

I must not use the correct command.

How do you do ?

Thanks

e.g.

root@ve1110(Active)(/Common)(tmos) list ltm data-group internal VIP_Internet
ltm data-group internal VIP_Internet {
    records {
        ForbiddenUrl1 {
            data "redirect http://website1.fr"
        }
        ForbiddenUrl2 {
            data "redirect http://website2.fr"
        }
    }
    type string
}

[root@ve1110:Active] config  cat /var/log/ltm
Feb 16 01:40:58 tmm info tmm[7321]: Rule /Common/myrule : [class get VIP_Internet]: {ForbiddenUrl1 {redirect http://website1.fr}} {ForbiddenUrl2 {redirect http://website2.fr}}
Feb 16 01:40:58 tmm info tmm[7321]: Rule /Common/myrule : [class search -value VIP_Internet starts_with ForbiddenUrl1]: redirect http://website1.fr
Feb 16 01:40:58 tmm info tmm[7321]: Rule /Common/myrule : [class search -value VIP_Internet starts_with ForbiddenUrl2]: redirect http://website2.fr
Feb 16 01:40:58 tmm info tmm[7321]: Rule /Common/myrule : [class search -value VIP_Internet starts_with ForbiddenUrl3]:

Thanks