Quartekoen Posted August 28, 2008 Posted August 28, 2008 I have a script that is designed simply for entering data into an invoice. When it starts, it puts the user in a certain field and pauses. The user enters data and hits enter which resumes the script. They are then sent to the next field, and it pauses again. This continues until they've entered all required data. (Yes, I know about tab orders and field behaviors. This method was chosen for another reason). Here's my problem. I had one of the users test out the system to see how it was working. He did well, but I noticed a couple times where he would accidentally hit enter twice without knowing it, thus sending him to the next field without the prior having data in it. This would 'confuse' my script. I'm wondering if there is a way to have a 'silent' form of data validation. I know that you can require 'not empty' in validation in the field options, but when the field is left empty, an annoying warning message comes up telling them that the field is required. What I'd much rather prefer is for it to, let's say, beep, then stay in that field. Basically, if they hit enter and the field has data, continue the script and go to the next field. If they hit enter and the field is empty, beep, but stay in that field. When data is then put in, and enter is hit, THEN continue the script and move to the next field. I'm rather stumped by this. Any help would be great. Thanks.
comment Posted August 28, 2008 Posted August 28, 2008 Well, you are running a script already - so why not incorporate this in the script itself?
Quartekoen Posted August 28, 2008 Author Posted August 28, 2008 Oh, don't get me wrong, that's what I want to do. My problem is moving around in the script If they hit enter and there's no data, it needs to beep *instead* of continuing on with the script. If I put a simple If statement in there, containing everything after the first pause, then sure, it will check to see if there's data, but then it will skip over the rest of the script, and the script will end. So my question would be: How do I sort of make a paused script continue if there's data and enter is pressed, and do nothing if there's no data and enter is pressed. I don't mean "don't continue". I mean "don't do anything. Don't continue. Just wait there until there's data, then go to the next field"
comment Posted August 28, 2008 Posted August 28, 2008 (edited) Loop Go to Field [ Table::Field1 ] Pause/Resume Script [ Indefinitely ] Exit Loop If [ not IsEmpty ( Table::Field1 ) ] Beep End Loop # Loop Go to Field [ Table::Field2 ] ... Edited August 28, 2008 by Guest changed the order slightly
Quartekoen Posted August 28, 2008 Author Posted August 28, 2008 Gosh, something in my mind was broken again, telling me that because I was already in a loop, I couldn't go into another one, but I'm sure this will be the solution. Thanks for coming through again.
Recommended Posts
This topic is 5932 days old. Please don't post here. Open a new topic instead.
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