Jump to content

script control of field/control behavior


 Share

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

Recommended Posts

It seems that I too often need to duplicate a layout simply to have a version with a different behavior on one or more fields. And duplicate layouts are expensive to maintain. In the simplest case, it would be nice if I could control whether a field is enabled in browse mode or not.

Link to comment
Share on other sites

  • 8 months later...

I missed your response. I know about field behavior. The point is that I have to create two layouts to have a field sometimes enabled and sometimes not enabled for entry, rather than being able to control that with a script.

Link to comment
Share on other sites

There are ways of controlling fields directly but it would depend upon the purpose here. For instance, are there certain privilege sets which should have access and others not? Or would it depend upon the value in another field?

For instance, if you can give up the ability to tab to the field, you can turn off entry via browse and attach a script directly to the field which, if certain conditions AREN'T met, will do nothing (no entry) but if the conditions are met, the button attached would be simple: Go To Field [ that field ]. You can also control access via privilege but, although I've played with that concept, I haven't used it extensively (it feels harsh to me).

Usually my 'field protect' scripts provide a message and look something like:

If [ 'whatever criteria not allowing entry' ]

Show Custom Dialog [ "Sorry but you can't" ]

Else

Go To Field [ that field ]

End If

LaRetta :wink2:

Edited by Guest
Added End If (blush)
Link to comment
Share on other sites

This topic is 5380 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
 Share

×
×
  • Create New...

Important Information

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