Newbies kc1983 Posted May 20, 2006 Newbies Posted May 20, 2006 Hi All, what i want to do sounds simple enough but for some reason i just cannot find a solution. I have set a layout "calls log" with scripted buttons for the user to press corresponding to the received call. All i wish to do is stop a user leaving that layout until they have entered data into the field, with pop up text appearing if the user tries to do so. Help will be gratefully received. Thanks.
mz123 Posted May 20, 2006 Posted May 20, 2006 You can do it through field validation (if you go to the field definition) where the field cannot be empty. Also, to all your buttons on that layout that allow people to leave, you can add a sub-script: If( IsEmpty(table1::field1)) Show Custom Dialog ("Please enter data iinto field 1.") Go to Field [ table1::field 1 ] Halt Script End If Will that do it?
Ender Posted May 20, 2006 Posted May 20, 2006 You could add a validation sub-script to any navigation scripts that leave the layout. Have the validation script check that all the required fields are entered: If [ isempty(field1) or isempty(field2) ... ] Show Custom Dialog [ "Message" ; "Enter something in both fields." ; "Ok" ] End If Just be warned: Having required fields when the user isn't ready to enter it can be frustrating for the user, and will result in garbage data if they have to enter something to exit the screen. I like to do things a little different for required sections. I use status flags to indicate when a section or process has all the required fields, then allow the user to navigate around the solution until they are ready to finish data entry for the required section: validation_section1 (calculation, text result) = case(not isempty(field1) and not isempty(field2); "√") Once everything has been entered, the Status of the record changes to "Complete" or whatever: Status (calculation, text result) = case(isempty(validation_section1) or isempty(validation_section2); "In Progress"; "Complete") If Finds need to be performed on the Status field and some of the validations are not stored, it would be better to make the Status field a regular text field and use a process script to set its value.
Newbies kc1983 Posted May 20, 2006 Author Newbies Posted May 20, 2006 thanks for the info guys. i'll go and give it a try. the fields contain or will contain quite quite a bit of information so will the "if is empty" stil work??
Recommended Posts
This topic is 6764 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