Nested expression help

stevekos07

Registered User.
Local time
Today, 08:20
Joined
Jul 26, 2015
Messages
174
Hello all, I would appreciate some help with a query expression.

I have a query which has a calculated field based on an IIF expression, that checks a range of date related conditions to resolve to a Yes or No. It is used to determine whether a client contact is required each day.

I am having a bit of a struggle determining how I can override this existing expression based on a dual-field date condition where if a date or dates appear in these, then the result automatically resolves to a "yes" regardless of anything else in the rest of the expression.

I would like some assistance with how to structure the expression.

e.g. IIF(Date()>=[SpecialCallFrom] And Date()<=[SpecialCallTo],"Yes", IIF(other expression....., "No"))

Thanks again in advance!
 
One suggestion I have is don't try to do it all in one query. Write a single simple query that does some of the steps, then use that query as the input table for the next query, and so on as required. In this way you can incrementally build towards your solution, and still have most of your steps be comprehensible after the fact, whereas one single IIF() that does all the work is a maintenance liability, IMO.
Hope this helps,
 
another suggestion is to consider using the choose function

choose(date between,"yes",somethingelseistrue,"No",anothercondition,"yes")
 
One suggestion I have is don't try to do it all in one query. Write a single simple query that does some of the steps, then use that query as the input table for the next query, and so on as required. In this way you can incrementally build towards your solution, and still have most of your steps be comprehensible after the fact, whereas one single IIF() that does all the work is a maintenance liability, IMO.
Hope this helps,

Thanks, that was the answer!
 

Users who are viewing this thread

Back
Top Bottom