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

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

Recommended Posts

  • Newbies
Posted

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!

Posted

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.

Posted

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.

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 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.