Part of my app tracks the progress on resolving warranty claims.
I have a query field that uses a nested IIF stmt to indicate what the next progressive step in the process is by analyzing which "completion boxes" have been checked (Steps in the process are logged by checking a check box when each step is completed).
Simple example -
Claim Status:IIF(CheckIssued]=-1,"Case Closed",IIF([DenyLtrIssued]=-1 and [MerchVal]>[DenyAmt] ,"Issue Check for for Partial Deny",IIF ([DenyLtrIssued]=-1 and [MerchVal]=[DenyAmt],"Issue Full Deny Letter",IIF(DenyLtrIssued]=0 and [CreditAmt]>0 and [IssueCRedit]=-1, "Issue Check for Credit Amt" ......))))
It goes on and on.....
The IIF's are nested in reverse order so that last action is analyzed 1st.
The formula gets increasingly complex with each possible variation especially since there are so many possible combinations (deny whole claim, deny partial claim, accept whole claim, send letter 1 if deny all, send letter 2 if partial deny, send check if accepted, etc.
Though it seems to work OK, I also get surpises every now and then when I find I have missed a combination of events
THere must be an easier way!!!
I have tried convering this to a Select Case but cannot figure out how create the criteria in the Select Case line ( equivilent to one of the nested IIF's) Any help in pointing me in the right direction would be appreciated.
jdttek
I have a query field that uses a nested IIF stmt to indicate what the next progressive step in the process is by analyzing which "completion boxes" have been checked (Steps in the process are logged by checking a check box when each step is completed).
Simple example -
Claim Status:IIF(CheckIssued]=-1,"Case Closed",IIF([DenyLtrIssued]=-1 and [MerchVal]>[DenyAmt] ,"Issue Check for for Partial Deny",IIF ([DenyLtrIssued]=-1 and [MerchVal]=[DenyAmt],"Issue Full Deny Letter",IIF(DenyLtrIssued]=0 and [CreditAmt]>0 and [IssueCRedit]=-1, "Issue Check for Credit Amt" ......))))
It goes on and on.....
The IIF's are nested in reverse order so that last action is analyzed 1st.
The formula gets increasingly complex with each possible variation especially since there are so many possible combinations (deny whole claim, deny partial claim, accept whole claim, send letter 1 if deny all, send letter 2 if partial deny, send check if accepted, etc.
Though it seems to work OK, I also get surpises every now and then when I find I have missed a combination of events
THere must be an easier way!!!
I have tried convering this to a Select Case but cannot figure out how create the criteria in the Select Case line ( equivilent to one of the nested IIF's) Any help in pointing me in the right direction would be appreciated.
jdttek