Skip to content

Groovy Scratchpad

Combine Value with static text:

.first() is needed in the Testconnector because all values are lists 

  1. //con.FULLNAME
  2. //"Added By the Testconnector!"
  3. //{FULLNAME} Added By the Testconnector!
  4. /*
  5. String fullname = con.FULLNAME?.first()
  6. if(fullname == null) {
  7. fullname = ""
  8. }
  9. String email = con.EMAILX?.first()
  10. if(email == null) {
  11. email = ""
  12. }
  13. return fullname + " " + email + " Added By the Testconnector!"
  14. */
  15. //con.FULLNAME.first() + " " + con.EMAILX?.first() + " Added By the Testconnector!"
  16. //"${con.FULLNAME.first()} ${con.EMAIL.first()} Added By the Testconnector!"
  17. //"$con.FULLNAME Added By the Testconnector!"
  18. (con.FULLNAME?.first() ?: "") + " " + (con.EMAILX?.first() ?: "") + " Added By the Testconnector!"