• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Create list of Mandatory fields - that can be modified by the user

I have an unusual request- is there code that will allow the user to update a table that list the name of the Mandatory fields, that can be used to validate which fields are required on which form at any given time?

My client is requesting some flexibility in the design of the database allowing the Admin to modify which fields are required (mandatory).

My thought was to create a table that will store the name of the fields, table name.  Then use this table to verify which fields required data and this will allow the admin user to turn on and off which are mandatory on the fly without coding.

any ideas will be greatly appreciated.

K
0
Karen Schaefer
Asked:
Karen Schaefer
  • 2
  • 2
2 Solutions
 
Jeffrey CoachmanMIS LiasonCommented:
Not sure if this is a good idea.
Required fields should be set by the developer and (for the most part) should not change very often.

If the ability to change these fields is granted, you may end up with a situation where certain fields are required one day, then not the next.
In other words, a field need to be completed one day, ...may be left blank in the future.

What if a field is required, then it is not... is it OK if there are empty values in the field? ...Then what happens if the field is changed back to requited with the empty values?
Who will manage the list?
Suppose a mistake is made?
What if two fields have the same name across tables?

The "Admin" wold have to be intimately familiar with all the relationships and consequences of changing a field property.
...As many unforeseen and unexpected data inconsistencies will result.
...(Then guess who they will call to fix these issues...?, or blame them on...)
;-)

Requests like this can be cumbersome to implement and manage.
They can also lead to other "unusual" requests.

just my 2c...
Lets see what other experts have to say...

JeffCoachman
0
 
Karen SchaeferBI ANALYSTAuthor Commented:
Thanks Jeff for your 2c worth, as usual you have a lot of could points.  I told my client I would research this issue.  I agree with what you say and this will back up my point with the client.  The client was planning for when I am no longer available to make the changes on their side of things.  Keep in mind that my client is use to keeping all the data in an Excel sheet and being able to change data sources and cell names on the fly.  I have been slowly educating them on the limitation of a Database design.  Which they decided to go, due to lack of data integrity, they don't seem to understand the willy-nilly approach will cause more problems then solve, so they better decide how they want to proceed in the design.  I am being a stickler for requirements and documentation prior to design, trying to insure that we have all the bases covered.

Thanks again for the input.

Karen
0
 
Jeffrey CoachmanMIS LiasonCommented:
Yes, ...as always, ...lets see if other experts chime in with additional insight...
;-)
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
From their point of view, I see "mandatory" as something of a business rule matter. For example, for certain types of Customers they may require a BillingAddress. For others, they may not.

If THAT is the sort of functionality they're after, then I can see the need for this, and your approach of using a table to store those things is about the only way I know to do this.

Your data relationships, on the other hand, should be designed into the structure, as Jeff indicates. For example, in an InvoiceHeader table, a Customer foreign key is always required, and that requirement could never change (unless you wanted to change the entire program, of course).

So I see two distinct versions of "mandatory" - one the user could define at runtime, and the other the developer would build into the app.
0
 
Karen SchaeferBI ANALYSTAuthor Commented:
thanks Scott,  for you insight.  I will point out these issues with my client and let them make the decision, if they want me to spend the time writing code to change mandatory fields.  It may be a simple of turning the field color to mandatory color to give them illusion of manadtory data entry.

Thanks to both of you for your time and input.

Karen
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now