Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Formulas & Validation Rules Discussion
- :
- If else in formula fields
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
If else in formula fields
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-11-2007 11:00 AM
For example
IF (ISPICKVAL(Quantity, "500")) {69.90
} ELSE IF(....
Thanks.
Re: If else in formula fields
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-11-2007 01:38 PM
Re: If else in formula fields
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-11-2007 01:43 PM
Re: If else in formula fields
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-11-2007 02:33 PM
I'm not sure I understand why you can't use CASE as NPM suggested. I've done something very similar to what you are doing -- I have been successful with a formula field that uses the CASE operator, evaulates a picklist, and produces a numeric formula return type. I then use that calculated numerical value in a rollup summary field. Is there something we're missing here? Assuming we are missing something, here's some (hopefully useful) insight on the ELSE inquiry.
Else isn't a defined operator in Salesforce, but it's accomplished using the "value if false" portion of the IF syntax:
IF(logical test, value if true, value if false)
You can string IF statements together, so your else value is simply another IF statement:
IF (ISPICKVAL(Quantity, "500"),"true value 1", IF(ISPICKVAL(Quantity,"400"), "true value 2","final else value"))
Re: If else in formula fields
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-11-2007 02:35 PM

