Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4937 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a database set up to log Disconnected Accounts (I work for an electric coop). I'm trying to make it fool proof for my users as most of them are not very computer savvy! I have a New Record button running the following script:

Set Error Capture [On]

New Record/Request

Show Custom Dialog [blah blah]

If [Get (LastMessageChoice) = 2]

Delete Records/Requests []

End If

Commit Records/Requests []

Perform Script ["Sort Records"]

My custom dialog box works fine. It pops up with the 3 fields that I want entered and if I hit cancel, it deletes that record or if I hit OK, it enters the record with the correct information. The problem I'm having is that one of my fields is a unique value to keep duplicates at bay, but it won't actually commit the record until i leave the record on the layout instead of in the script. Surely I'm missing something little here. The main reason I want the dialog box is that I don't want my users "losing their place" in the database when they enter a new record. But I also don't want them to have to click out of the record to get it to commit and then they find out they have a duplicate.

Does this make sense?

Thanks in advance!

I'm a novice so I need details! :B

Posted

Well, I'm sure it isn't because I have my unique field set that on commit, it checks to make sure that is a unique value and then it tells me if it isn't. Also, when I set up the field properties to run a script trigger when i leave that field and go to the next it works then too, but when I activate this Custom Dialog box, then it stops working until I actually click out of the record, and then it commits and pops up the duplicate notification.

Also, it doesn't do the sort until I click out of the record either, so its like its not finishing that script. But I'm not sure what to look for to fix it or if there is another command in that script that I need to set up to make it work properly.

Posted

Just a thought.... Does it have to do with the Error Capturing? If you capture all errors, will it display that it is a duplicate?

Well, I'm sure it isn't because I have my unique field set that on commit, it checks to make sure that is a unique value and then it tells me if it isn't. Also, when I set up the field properties to run a script trigger when i leave that field and go to the next it works then too, but when I activate this Custom Dialog box, then it stops working until I actually click out of the record, and then it commits and pops up the duplicate notification.

Also, it doesn't do the sort until I click out of the record either, so its like its not finishing that script. But I'm not sure what to look for to fix it or if there is another command in that script that I need to set up to make it work properly.

Posted

The main reason I want the dialog box is that I don't want my users "losing their place" in the database when they enter a new record.

I am not sure what you mean by "losing their place". If they enter a new record, shouldn't they be moved to the new record?

In any case, if you want a record to commit without throwing a validation error, you must either do Commit Records [skip data entry validation] - which I presume you would not want to do - or use other means to make sure the value is unique before you try to commit.

Posted

I am not sure what you mean by "losing their place". If they enter a new record, shouldn't they be moved to the new record?

In any case, if you want a record to commit without throwing a validation error, you must either do Commit Records [skip data entry validation] - which I presume you would not want to do - or use other means to make sure the value is unique before you try to commit.

Well, the "lose their place" comment is just a reference to the illiteracy of the people that will be using it. That is in by no means a bash on them, its just a fact that most of them are not good with computers, and I don't want to have to make them search through a screen full of records just to see which one they have selected. FileMaker does a bad job of highlighting records in my opinion. It shows a tiny little black line on the left side of the first field in the record. Not very useful unless you know what you're looking for.

As far as validating that field, what are my other options? That's what I'm trying to figure out. With the dialogue box entry option, it seems that it just fills the info into the fields and it does nothing else as far as validating or anything like that until you click out of the record, which then commits the record, which then validates that field and throws up the error if it is in fact a duplicate.

Posted

Just a thought.... Does it have to do with the Error Capturing? If you capture all errors, will it display that it is a duplicate?

reichwald114, Thank you so very much! I never thought of it validation as being an error when it found a problem. I turned Error Capture off and voila...it works! =)

Thanks for shooting ideas at me!

Posted

it does nothing else as far as validating or anything like that until you click out of the record,

That's not quite clear: your script tries to commit - I can't see where you get the opportunity to "click out of the record". You should be getting a validation error as soon as you hit OK on the custom dialog.

what are my other options?

Hard to advise without more details. Perhaps you could define a value list using values from the field, and check the entry against that. You could also use global fields for the dialog, and check the uniqueness via a relationship.

This topic is 4937 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.