January 25, 200520 yr I am working on a DB for employee tracking and I have a field called "Employee Status". I have a drop down of 5 items. 2 of wich are the words "Vacant" and "Contract". If I select either of those two words, a second window pops up and asks for two date values that must be entered. If I write a calculation for the "Employee Status" field and define as such. How should I modify my script to where it will bring up a second window that allows me to enter the Request Date and Expiration Date? They can be both assigned the same because they both represent the same result if either is selected. Let("Vacant" and "Contract" = 1), If "Employee Status" = 1, Then open layout "Date menu" Then the two dates would be entered, user would click OK, and close the window. Simple, but what would be the best method to write this?
January 25, 200520 yr I'm not sure what calc you want exactly. When a value is selected from list, a button or a plug-in would lauch a script. If[value = "Vacant" or value = "Contract"] New Window... Loop Pause[ unknown] EndLoop Then your Button, would be set to "Continue" (not sure of the US translation for this) and will close the window.
January 25, 200520 yr Author I don't think you would want to loop it.. What would the loop serve as??
January 25, 200520 yr To lock the window, so that the user can't leave it unless the 2 fields has been filled or/and the button "OK" would be hit.
January 26, 200520 yr Author That makes sense. Good point! The calc would be as described to validate if "Contract" or "vacant" were selected from the drop down list, to show the second window with the 2 date fields for entry and an ok button to close the window. Your script example above works but the only issue is how to trigger it after data entry has been performed? In the validation tab for the field, it doesn't give you the option to validate by script unfortunately.
January 26, 200520 yr On Windows, you can define a field formatted as a menu as a button and run the appropriate function after a selection has been made. Remove the field from the Tab order so that users are forced to click on it. Use a script like Allow User Abort [Off] Go to Field [yourfield] Pause/Resume script [1] If [PatternCount( " vacant contract "; " " & Employee Status & " " )] New Window ... End If
Create an account or sign in to comment