This should get you started on the syntax. It is the first two if statements. Keep adding on with the following in mind:
- QB evaluates if from top to bottom. As soon as it hits a true statement, it stops and outputs the result. So be sure by the time you get to your last statement, that none of the prior statements could have been true.
- Use ="" to evaluate if a text field is blank, use isnull or not isnull to evaluate numeric and date fields.
- Use the or operator for spots where you say 'at least one of the fields is...'
- Group your conditions in parentheses. See the higlighted parentheses below.
If(
[Program - HTH] = "" and isnull([RRH Match]) and [nonDHS Program]="", "Phase 1",
( not is null([Date of Match to Program - HTH]) or not isnull([nonDHS Date of Match to Program - Manual])) and isnull([Date Prover Changed - HTH]) and isnull(nonDHS Date Provider Assigned - MANUAL]), "Phase 2",
.....
)
------------------------------
Michael Tamoush
------------------------------