Page 2 of 2

Re: Criteria Evaluation Routine Specifications

PostPosted: Wed Nov 16, 2011 3:48 pm
by BillyBoyo
If you stick to a simple approach, I think it can be done without too much stuff.

The order of precedence is the order they appear. Dumb, but easy to code for. The OR+ thing is dumb, but easy to code for (ignore the OR+ completely and just treat what follows as a new line).

You have

field name
comparative operator
value
logical operator

I'd make a table with five items, including a "sequence number" for the input record. Split the input into groups of four (remembering your first-only and last-in-sequence will only have three) and store them in a table under a sequence number. Give the stuff after the OR+ a seperate sequence number and just process as normal otherwise.

Read your input. Match to the table, respecting the sequence numbers.

They only want TRUE/FALSE as output, so give them that, but also do a seperate dataset with the input record causing the match (if there was) (and therefore store it, little bit to do the OR+) the sequence number causing the match (if there was) or a nice message for no match - and of course printing the input data that the match was attempted against. Give them this dataset as your results. Make it difficult to assess quickly, but have all the information there - have the TRUE/FALSE pages ready as well :-)