Forum Discussion
Yaoxie_117356
Nimbostratus
Jul 05, 2016basic question about variable assign
Hi folk,
very new to APM, have a lot questions on assign variable
why sometimes it's
variables {
{
expression "mcget {session.logon.last.username}"
v...
Saravanan_M_K
Employee
Jul 05, 2016variables {
{
expression "expr {[mcget {session.logon.last.password}]}"
varname session.logon.last.password2
}
}
In your example, the expr is actually not needed. The above will produce the same result as in the config:
variables {
{
expression "mcget {session.logon.last.password}"
varname session.logon.last.password2
}
}
However, you can evaluate any tcl expression using "expr". For example:
variables {
{
expression "expr {[string tolower [mcget {session.logon.last.username}]]}"
varname session.custom.user
}
}
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