crissleonetti

Velocity Script - List multiple values if a single or more choice is selected

Jun 24th, 2021 (edited)
491
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #set( $fieldsAndFriendlyNames = {
  2.   "becomeapartner_test" : "Become a partner",
  3.   "sNBusinessIntelligence" : "Business Intelligence",
  4.   "sNCloud" : "Cloud",
  5.   "sNEmbeddedIntelligence" : "Embedded Analytics",
  6.   "sNHyperIntelligence" : "HyperIntelligence",
  7.   "sNProfessionalServices" : "Counsulting",
  8.   "sNRequestADemo" : "request a demo",
  9.   "sNRequestPilot" : "request a pilot",
  10.   "sNRequestPricing" : "request a pricing",
  11.   "sNScheduleAMeeting" : "schedule a meeting",
  12.   "sNStartAPilot" : "start a pilot"
  13. } )
  14. #set( $trueFields = [] )
  15. #foreach( $fieldDesc in $fieldsAndFriendlyNames.entrySet() )
  16. #set( $fieldRealName = $fieldDesc.getKey() )
  17. #set( $fieldFriendlyName = $fieldDesc.getValue() )
  18. #if( $lead[$fieldRealName].equals("1") )
  19. #set( $void = $trueFields.add($fieldFriendlyName) )
  20. #end
  21. #end
  22. ${display.list($trueFields)}
RAW Paste Data