Forum Discussion
APM variable assign and if statement
Hi Noam,
the best way to check and selectively transform the requested APM session variable, is to use a Variable Assign action item in VPE containing some custom TCL code.
Variable Assign Action
- Name: Transform_Logon_Domain* Type: Custom Variable
- Mode: Unsecure
- Variable Name: session.logon.last.domain
- Expression :
set current_domain [mcget {session.logon.last.domain}] ;
if { $current_domain equals "local.domain" } then {
return "abc.remote" ;
} else {
return $current_domain ;
} ;
Note: You can also check the domain name with an branch rule and trigger the variable assign action only if "local.domain" is currently selected. This will eliminate the else part of the expression, but on the other hand may clutter the policy little more. In the end both methods will work out, so its up to you...
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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