Newbies cyberstu Posted July 15, 2005 Newbies Posted July 15, 2005 Forgive a newbie asking a dumb question to which I cannot find a posted answer. Is there anyway to script field behavior. I want, for example, to be able to automatically lock (prevent data entry in Browse mode) certain fields once a certain date has passed. Another related problem....is there a way to script the field color? I know how to script text color, but not the field background itself. Thanks for any help!
SlimJim Posted July 15, 2005 Posted July 15, 2005 I think you may need to be in Layout mode to change the behaviour of a field and I don't think you can achieve that in Scriptmaker. You can achieve something by validation. So, for example, if your Date after whch you want to lock is stored in a date field LockDate then validate by calculation: If(Get(CurrentDate) > LockDate; 0 ; 1) . Ensure that Allow user to override is not selected. I am not sure if you need to select validate always or only during data entry. I have tried it both ways and it seems to work either way. Of course it is not the same as not allowing data entry since it is in fact possible to enter data - but as soon as you try to commit the record you get the please revert record message box.
Reed Posted July 15, 2005 Posted July 15, 2005 For color, you can make the field transparent and place another field behind it. In that field, just place some calculated text, that you can control the color via script. If the font size is set very large, then the entire field will be the color of the text.
Recommended Posts
This topic is 7073 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