I have two user defined variables like this.
I want to use one variable value as the parameter name in the second parameter. In this case I want Teacher as the result.
I used it like this but not working.
(${__eval(${pName})
I have two user defined variables like this.
I want to use one variable value as the parameter name in the second parameter. In this case I want Teacher as the result.
I used it like this but not working.
(${__eval(${pName})
you can use __V function. This returns the result of evaluating a variable name expression and can be used to evaluate nested variable references
If you want to have Teacher value you need to use ${pDesig} JMeter Variable reference:
In particular your case using __eval() function is not required at all. The valid use case for the __eval() function is when you have JMeter Function or Variable coming from external data source, i.e. from CSV Data Set Config and want JMeter to evaluate the function or variable so it would be substituted with its respective value.
More information: Here’s What to Do to Combine Multiple JMeter Variables