Forum Discussion
Vince_Beltz_959
Nimbostratus
Apr 15, 2009Simple Question
I have an external integer data group containing a single numeric value. I want my iRule to read that value, and set the value of a variable equal to it. I've been looking at findclass and getfield, but only want that first (and only) value. Help?
3 Replies
- The_Bhattman
Nimbostratus
Have you looked into lassign ( Click here)?
I suppose you can do lassign against a findclass to get a variable assigned.
hope this helps
CB - hoolio
Cirrostratus
It looks like the lassign command was added in TCL v8.5. F5 is using 8.4.x in all existing versions.
You could use [lindex $::datagroup 0] to get the first (or only) element of the datagroup.
Aaron - hoolio
Cirrostratus
In 10.x+ you can use class element for this:
http://devcentral.f5.com/wiki/iRules.class.ashx
class element [< options >] < index > < class >
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
