Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best practice
Message
 
To
14/06/2001 09:06:13
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00519257
Message ID:
00519268
Views:
15
Kevin,

The way I handle apps that have many rules, especially ones that the rules may change, is via a table. I would suggest that you have a table with a structure like the following:

Column Field Type
primary key I
module C(10)
condition M
errormsg C(100) or a Memo

This way, based on the form/module that you are in, you can query this table for all of the pertinant rules. Once the rules have been retrieved, you can issue an EVAL() on the condition value to determine if the data passes/fails the rule.

For ease of updating, you may want to make this a free table.

HTH
Doug

>My current application consists of many rules/validation (ie cannot do A unless B has been done. Cannot to D unless B comes from A - things like that), these rules are becoming very cluttered as they are spread amongst Methods amongst Forms..
>
>What I need to know is how people handle lots of complex rules and how they tie them in. What I am trying to achieve is an effective method that appears more logical than what it actually is, and is easy to maintain/amend.
>
>Any ideas/thoughts.
>
>I know I haven't gone into much detail, but I can if necessary
>
>Thanks
>Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform