Trying to build an indicator to filter rows and am running into datatype mismatch. I have tried nz, isnull, val, and so far it persists. Hopefully someone will see what I'm not.
This works fine without a where clause:
If I add where clause IS NOT NULL, I get the error.
Created a new field and when I take out the "OR" condition, it works with Where > 0
I have narrowed down to this as the problem area:
That piece is doing double duty in that it is comparing two fields and if the value of b04_Curriculum is contained within Curriculum, we don't need it and in turn remove the semicolon if there is an extra one, then we need to count how many semicolons are left as we can only use two curriculums for the automated process, due to current design, any additional ones we need to input to the other application have to be done manually. As a visual of the data for the curriculum expression:
[pre]
b04_Curriculum
Accounting and Financial Statements
curriculum
Accounting and Financial Statements;Financial Leadership Forum;Fraud;Business and Industry;Finance, Financial Management and Controllership
[/pre]
Italicized would need to be manually added
CountOccurrences came from:
This works fine without a where clause:
Code:
ExtraCredit: IIf(IIf(Nz([GT],0)>1,1,0)+IIf(Nz([AA],0)>1,1,0)+IIf(Nz([ET],0)>1,1,0)+IIf(Nz([YB],0)>1,1,0)+IIf(Nz([RR],0)>1,1,0)+IIf(Nz([FR],0)>1,1,0)>2 Or countoccurrences(Replace(Replace([Curriculum],[b04_Curriculum],""),";;",";"),";")>2,"Manual Edit Netforum","")
Created a new field and when I take out the "OR" condition, it works with Where > 0
Code:
ExtraCreditIndicator: IIf(IIf(Nz([GT],0)>1,1,0)+IIf(Nz([AA],0)>1,1,0)+IIf(Nz([ET],0)>1,1,0)+IIf(Nz([YB],0)>1,1,0)+IIf(Nz([RR],0)>1,1,0)+IIf(Nz([FR],0)>1,1,0)>2,1,0)
I have narrowed down to this as the problem area:
Code:
countoccurrences(Replace(Replace([Curriculum],[b04_Curriculum],""),";;",";"),";")","")
That piece is doing double duty in that it is comparing two fields and if the value of b04_Curriculum is contained within Curriculum, we don't need it and in turn remove the semicolon if there is an extra one, then we need to count how many semicolons are left as we can only use two curriculums for the automated process, due to current design, any additional ones we need to input to the other application have to be done manually. As a visual of the data for the curriculum expression:
[pre]
b04_Curriculum
Accounting and Financial Statements
curriculum
[/pre]
Italicized would need to be manually added
CountOccurrences came from: