Search Community
- Force.com Discussion Boards
- :
- Salesforce User Discussions
- :
- Product Discussion
- :
- need help replicating a picklist value
turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
need help replicatin g a picklist value
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-20-2008 10:02 AM
Use Case:
I want to be able to easily run reports on our leads to see what the first lead source was and what the last lead source was. To do this I setup a field call Primary Lead Source and created a workflow that executes on Lead creation, the following script:
(IF( ISPICKVAL(LeadSource, "Contact Form") , "Contact Form",
IF( ISPICKVAL(LeadSource , "Employee Referral") , "Employee Referral",
IF( ISPICKVAL(LeadSource, "enewsletter") , "enewsletter",
IF( ISPICKVAL(LeadSource , "External Referral") , "External Referral",
IF( ISPICKVAL(LeadSource, "inbound call") , "inbound call",
IF( ISPICKVAL(LeadSource, "Landing Pages") , "Landing Pages",
IF( ISPICKVAL(LeadSource, "Trade Show") , "Trade Show",
IF( ISPICKVAL(LeadSource, "Existing Customer") , "Existing Customer",
IF( ISPICKVAL(LeadSource, "Support Quote") , "Support Quote",
null
))))))))))
I simplified the above script so that there aren't as many options. So the issue is that I don't want to have to update this script everytime we add a lead source. Can anyone think of a way of having it automatically check the picklist for the value and if it exists to print that value in the field?
Any help would be greatly appreciated
I want to be able to easily run reports on our leads to see what the first lead source was and what the last lead source was. To do this I setup a field call Primary Lead Source and created a workflow that executes on Lead creation, the following script:
(IF( ISPICKVAL(LeadSource, "Contact Form") , "Contact Form",
IF( ISPICKVAL(LeadSource , "Employee Referral") , "Employee Referral",
IF( ISPICKVAL(LeadSource, "enewsletter") , "enewsletter",
IF( ISPICKVAL(LeadSource , "External Referral") , "External Referral",
IF( ISPICKVAL(LeadSource, "inbound call") , "inbound call",
IF( ISPICKVAL(LeadSource, "Landing Pages") , "Landing Pages",
IF( ISPICKVAL(LeadSource, "Trade Show") , "Trade Show",
IF( ISPICKVAL(LeadSource, "Existing Customer") , "Existing Customer",
IF( ISPICKVAL(LeadSource, "Support Quote") , "Support Quote",
null
))))))))))
I simplified the above script so that there aren't as many options. So the issue is that I don't want to have to update this script everytime we add a lead source. Can anyone think of a way of having it automatically check the picklist for the value and if it exists to print that value in the field?
Any help would be greatly appreciated

