Ok boys (and girls - - - can't leave them out) here is a nice little challenge for you. This is probably very simple, but it has escaped me. Maybe I need to get some more sleep. Hmmm what is that??? Oh yes . . . that is what I used to do when I was much younger.
Converting A4 to A5. In A4 I have a script that does all the following for me. It opens a DB, gets key info from client for a lookup key, does xlookup of proper record, verifies proper data entry and give appropriate error message if needed, then updates entry in DB and gets next item from client. This occurs for the 5 items we are checking. These are logicals that will not allow 2 sequential 'false' entries, i.e. last entry was T this entry was F = good, last entry was F this entry was F = NOT good error message, exit script, do not allow further entry
It then closes that DB, gets info for next key item to verify, open another DB and does xlookup to get the appropriate record, and verifies the field data entered is greater than the current field value. If not, it gives an error message and asks for new data again. It does NOT update the field; this is only to verify the data input is valid prior to opening the DB this data will be used in. This is done again with the next piece of data.
Once the data entry has been verified I close the DB, I then open and create the new record in a different DB and populate that with the data I have collected, save the data and reopen in change mode. Then the client adds additional data to the form and saves the data.
Now that A4 method is there, here is what I have tried to do so far in A5. I created a form attached to my 'menu' table with all the data in global variables and the 5 logicals in checkbox format populated with F as default. For all the key values I use the 'exist' xbasic command to verify I have a good key. Field1 is the lookup key to check the logicals, Field2 is the lookup key to verify the data in Field3, and Field4 is the key to lookup to verify the data in Field5. I also have a Button object on the form that they will push after data verification has been done. I have set the variable 'datagood' to F as default and the button will not execute if that is still false. I also have an 'Abort' button that will cancel this form and the data.
So here is my problem, how do I fetch the appropriate record based on the key provided to verify the data? And second, what is the best way to display the error messages that are generated if the data is not valid?
Converting A4 to A5. In A4 I have a script that does all the following for me. It opens a DB, gets key info from client for a lookup key, does xlookup of proper record, verifies proper data entry and give appropriate error message if needed, then updates entry in DB and gets next item from client. This occurs for the 5 items we are checking. These are logicals that will not allow 2 sequential 'false' entries, i.e. last entry was T this entry was F = good, last entry was F this entry was F = NOT good error message, exit script, do not allow further entry
It then closes that DB, gets info for next key item to verify, open another DB and does xlookup to get the appropriate record, and verifies the field data entered is greater than the current field value. If not, it gives an error message and asks for new data again. It does NOT update the field; this is only to verify the data input is valid prior to opening the DB this data will be used in. This is done again with the next piece of data.
Once the data entry has been verified I close the DB, I then open and create the new record in a different DB and populate that with the data I have collected, save the data and reopen in change mode. Then the client adds additional data to the form and saves the data.
Now that A4 method is there, here is what I have tried to do so far in A5. I created a form attached to my 'menu' table with all the data in global variables and the 5 logicals in checkbox format populated with F as default. For all the key values I use the 'exist' xbasic command to verify I have a good key. Field1 is the lookup key to check the logicals, Field2 is the lookup key to verify the data in Field3, and Field4 is the key to lookup to verify the data in Field5. I also have a Button object on the form that they will push after data verification has been done. I have set the variable 'datagood' to F as default and the button will not execute if that is still false. I also have an 'Abort' button that will cancel this form and the data.
So here is my problem, how do I fetch the appropriate record based on the key provided to verify the data? And second, what is the best way to display the error messages that are generated if the data is not valid?
Comment