Forum Discussion

mvnarendra's avatar
mvnarendra
Occasional Contributor
6 years ago
Solved

Is it possible to use if else conditions in dynamic property expansion

Hi,   I am trying to send a dynamic mock response using dynamic property expansion. I am able to use a ternary operator to set dynamic value. But I want to see if else conditions can be used or n...
  • JHunt's avatar
    JHunt
    6 years ago

    The problem is that you can't use braces when writing inline scripts. It's a limitation of SoapUI - a significant one since Groovy uses braces often.

     

    But this should work...

     

     

    ${= if(result.equals("success")) "success" else "error" }