alex.v Posted July 25, 2003 Posted July 25, 2003 Hi, I'm new to all this, I would appreciate any help to my two questions. I have a DB with many files. One of the files has a tabbed interface to different layouts. Once the user chooses ONE of the layouts and enters data there, I want to prevent entry into fields in the other layouts. I thought of using a validation by calculation in the fields. That is: when entering data, calculation (IsEmpty?) checks whether specific fields in other layouts are empty. How do I write that calculation? Second, possibly related question: One field in each layout (depending on which layout is chosen) is obligatory. When info is entered there, it does the above validation, and then I want it to automatically check a checkbox or radio button field, to record which layout was used. I need that for sorting etc. How should I achieve that? Thanks in advance...
Razumovsky Posted July 25, 2003 Posted July 25, 2003 Hi Alex, First, I would reccomend that you consider using scripts/buttons to go between layouts, verify which layout has been used, and mark your checkbox. While I am not quite sure what your DB is doing, I suspect it will give you better flexibility and be easier to create, troubleshoot, and add to. That being said, you could do this with auto validation calcs. Given 2 Layouts and 4 text fields: LayoutA -field1 -field2 LayoutB -field3 -field4 Set fields 1 and 2 to be validated by calculation: isempty(field3) and isempty(field4) Set fields 3 and 4 to be validated by calculation: isempty(field1) and isempty(field2) Second question- create calc field displaying result as number: case(not isempty(field1) or not isempty(field2), 1, not isempty(field3) or not isempty(field4), 2,0) This will give you "1" for layoutA, "2" for layoutB, and "0" for neither. Format your checkbox accordingly. Again, you are asking for problems with this method (at least with your first question). For example, say a user goes to layoutA, enters a carrige return accidently in field1, and then shifts to LayoutB and tries to enter in field3. The validation calc will give an error message because field1 is really not empty, and the user will probably be scrathing their head for a long time trying to figure it out. I would consider using scripts. -Raz
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now