Notification

Welcome to the help center for Search Ads 360, a platform for managing search marketing campaigns.  While the help center is available to the public, access to the Search Ads 360 product is available only to subscribing customers who are signed in. To subscribe or find out more, contact our sales team.

if_error

If value is an error, evaluates and returns alternate. Otherwise, evaluates and returns value.

Syntax

if_error(value, alternate)

value and alternate can be an expression, any data type, or any Search Ads 360 variable. They must both be of the same general data type (that is, they must both be numbers, or text, or dates).

You can nest this function to create an if/then/else evaluation.

Examples

  • Converts a string to a number if the format matches the advertiser’s locale. Otherwise, returns 0:
    If_error(To_number("1.067,30"), 0)

  • Returns “--” if there’s an error in the mid() function. Otherwise returns "Hello World!":
    if_error(mid("Hello World!", 0, 20), "--")

  • Example of nested error checking. If there’s an error in the mid() function, the expression evaluates the left() function. If the left() function evaluates to an error, the expression returns “---”::
    if_error(
      mid("Hello World!", 0, 20),
          if_error(left("Hello World!", 5), “---”)
    )

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

Search
Clear search
Close search
Google apps
Main menu
16023346709609912468
true
Search Help Center
true
true
true
true
true
263
false
false