AnneMartin
2 years agoQrew Trainee
Type mismatch
This is to calculate a bonus for our technicians based on how many hours they bill. Some technicians get an additional bonus for hours worked on refrigeration equipment and some don't.
I'm getting a type mismatch from my IF statement, so I added a tonumber but am still getting the same error. Any ideas?
I've tested the parts of my formula separately and they work as far as I can tell, it's just the IF statement that's giving me grief.
SumValues(GetRecords($myquery,[_DBID_QSALESHISTORY]),23)+[Hours Adjustment]+
If([Refrigeration Rate]="",
(tonumber(SumValues(GetRecords($aquery,[_DBID_QSALESHISTORY]),23)+[Refrigeration Hours Adjustment])))
------------------------------
Anne Martin
------------------------------
I'm getting a type mismatch from my IF statement, so I added a tonumber but am still getting the same error. Any ideas?
I've tested the parts of my formula separately and they work as far as I can tell, it's just the IF statement that's giving me grief.
SumValues(GetRecords($myquery,[_DBID_QSALESHISTORY]),23)+[Hours Adjustment]+
If([Refrigeration Rate]="",
(tonumber(SumValues(GetRecords($aquery,[_DBID_QSALESHISTORY]),23)+[Refrigeration Hours Adjustment])))
------------------------------
Anne Martin
------------------------------