Jump to content

script fires on entering a field?


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

Recommended Posts

is there a way to create a script that fires everytime any field is entered? I want to create a global field that always contains what the curent field's data is upon entering that field (before the data is modified). I have a history field I'm creating that will record any and all changes to any field. I want it to read "so and so changed this field's data from X to Y. I have OaziumEvents plugin that fires a script upon exiting a field, but not upon entering? It all works except for setting a global field to hold the old data (X) before its changed to Y. I think I could make it work if EVERY field had a backup global field, but that gets dirty fast, cuz I've got over 30 regular fields and each would require is own script upon exiting... It would sure be sleeker if only one global field could handle the load. Does this make any sense at all??? laugh.gif" border="0

Link to comment
Share on other sites

Thanks for the idea, but I don't think it'll suit our needs here. We are using the DB for scientific data, and rarely enter our data linearly into the DB. I had a new idea of buttonizing each field entry box, but the buttonizing function doesn't seem to work when viewing the data in a Table (which is our prefered layout)...shucks...

Link to comment
Share on other sites

You can trigger a script on entry to a field by setting it up as follows:

1. Go into layout mode

2. In the field format dialog, un-check the allow entry to field option

3. With the field selected, select the button option in the format menu and select the script that you want to execute.

Your script can then have whatever steps you want, in order to copy the initial data to another field etc., but the script should have these steps at the very end:

Exit Record/Request

Go to Field [MyField]

where MyField is the field that you are concerned with.

The limitation with this method is that you cannot tab into the field.

Link to comment
Share on other sites

regarding Table view: just make a real layout that looks identical to what you are getting with table view. Now you can add the scripts to the fields.

Link to comment
Share on other sites

This topic is 7293 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

  • Who Viewed the Topic

    1 member has viewed this topic:
    mr_vodka 
×
×
  • Create New...

Important Information

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