become a formula writing guru in 20 minutes by mike martin & shannon howe

17
© 2016 Appirio, Inc. - Confidential Become A Formula Writing Guru in 20 Minutes Tips and Examples Shannon Howe, Technical Consultant, Appirio @howshannon [email protected] Mike Martin, Client Partner, Appirio @mikemartin__c [email protected]

Upload: salesforce-admins

Post on 14-Feb-2017

34 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

© 2016 Appirio, Inc. - Confidential

Become A Formula Writing Guru in 20 MinutesTips and Examples

Shannon Howe, Technical Consultant, Appirio@[email protected]

Mike Martin, Client Partner, Appirio@[email protected]

Page 2: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

Forward-Looking StatementsStatement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements

Page 3: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

Quickly, RAISE YOUR HANDS if you’ve

Page 4: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

Session Agenda

Six different applications in only 20 minutes. Can we do it? You bet.• IF vs CASE • AND, &&, ||, OR • TEXT vs VALUE • NOW, TODAY • CONTAINS, ISBLANK • CONCATENATE

LET’S GO!

Microsoft Office User
Page 5: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

UNEXPECTED Pre-Presentation Bonus SlideGet this glorious Chrome extension. It makes reading and editing formulas easier! Find it now, here: bit.ly/formulasdf16

Microsoft Office User
bitly for the extension
Page 6: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

IF

IF• Evaluates an expression for a true or false outcome, then does

stuff based on whether it was true or false.• If Taylor Swift is awesome, Shout Hooray, if she isn’t awesome then do

nothing• IF(2 + 2 = 4, True, False)

• If evaluating multiple expressions for the same outcome (using OR or AND), pick IF

Page 7: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

Good Reason for IF

If evaluating multiple expressions for the same outcome (using OR or AND), pick IF

Page 8: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

8

CASECASE• Evaluates an expression for a specific value, then does stuff based on the value. • If evaluating one expression for an outcome, use CASE instead of IF

Page 9: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

Simplify IF with CASE!Before

After

Microsoft Office User
update formula
Microsoft Office User
talk about compile limits
Page 10: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

AND, &&, ||, OR

What’s the difference?Well, not much… They both do the same thing, slightly differently. • AND( expression1, expression2, expression3) returns TRUE value if all of

the expressions are met. • && is used to combine expressions, looking for both to be met• OR(expression1, expression2, expression3) returns TRUE if any of the

expressions are met. • || is used to compare expressions, looking for either to be met

Page 11: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

Totally Your Preference• In the following example, we want to check a checkbox “Call Today” when

all of the conditions are met.• If you like working with parenthesis to break things out, use && and ||

• If you prefer a cleaner look/feel, use AND( ) and OR ( )

Microsoft Office User
order of operations - can be easier with paren instead of && ||
Page 12: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

TEXT vs VALUE • TEXT in this workflow

rule criteria converts the picklist value in the Industry field to TEXT and checks to see if it is Finance.

• VALUE converts a text string into a number (so you can use it as a number in calculations, etc). The following converts the data collected in an integrated text field to a number value (for reports!)

Microsoft Office User
workflows ispickval - text instead of value
Page 13: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

NOW and TODAY

• NOW returns the current date/time. The following example displays Hours Since Last Email.

• TODAY returns the date today. The following example displays Days Since Opportunity Closed.

Page 14: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

CONTAINS and ISBLANK• CONTAINS returns a TRUE value

if the first argument contains the second argument. In this example, emails with “Urgent” in the subject are marked High Priority.

• ISBLANK Returns a TRUE value if the expression is blank. In the following, we check to see if the email field is blank. If it is, we set the form status to Incomplete.

• Protip: Don’t use ISNULL anymore. Instead, use ISBLANK.

Page 15: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

CONCATENATE

• Trick slide! Audience volunteer, can you please tell me what a concatenate function does and where I can find it?

Page 16: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe

• If you find something useful, copy and paste it. EVERYONE does it!!

• NO NEGATIVE THINKING. Practice makes perfect. • Visit the Help article• Take the trail on Trailhead• Search answers, ask questions • Checkout Example Advanced Formulas• Ask questions on Salesforce StackExchange• Check out the Dev docs on formulas

Ready, Set, GO!

Page 17: Become A Formula Writing Guru in 20 Minutes by Mike Martin & Shannon Howe