Search
Search Practice CS Support Help and Support.

Examples of multiple criteria for IF statements

When working with an IF statement, you can use more than 1 criteria. This may be something such as requiring multiple dates, types, activities, or multiple fields on a project. You might also have multiple criteria for a PrintWhen statement. Refer to the following examples when working with multiple criteria in an IF statement.

Use AND in an IF statement

[IF(formula AND formula, true, false)]
Example 1
  • [IF (hungry = TRUE AND thirsty = TRUE, then eat & drink, otherwise do nothing)]
  • The statement will show "If I am hungry and I am thirsty, I will eat & drink, otherwise I will do nothing"
Example 2
  • [IF(Sheet Entry Activity Method Is Expense(Sheet Entry) = TRUE AND Activity Class description(Sheet Entry activity activity class(Sheet Entry)) = "Billable", Sheet Entry amount(Sheet Entry), 0)]
  • The statement will show "If the timesheet's activity type is an expense and the activity's class is billable, print the amount, otherwise print zero"
note
This example prints all timesheets that are only billable expenses.

Use OR in an IF statement

[IF(formula OR formula, true, false)]
Example
  • [IF(Sheet Entry Activity Method Is Expense(Sheet Entry) = TRUE OR Activity Class description(Sheet Entry activity activity class(Sheet Entry)) = "Billable", Sheet Entry amount(Sheet Entry), 0)]
  • The statement above says "If the timesheet's activity type is an expense or if the activity's class is billable, print the amount, otherwise print zero"
  • This example includes all timesheets that are billable and all timesheets that are expenses.
note
You can use the
IF Statement builder
in the
OutputValue Formula
window to build either of these types of formulas. Insert or enter your additional criteria after the 1st criteria. There's no limit to the number of AND or OR statements you can use.

error-icon

Triva isn't available right now.

Check out the support page for our phone number and hours

error-close