Jump to content

Clear ALL Fields at once


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

Recommended Posts

Hello, I have a layout with many fields and I was wondering if there was a command in the scriptmaker that would clear them all at once, instead of having to choose clear in the scriptmaker for each individual field...

Thanks for any help!!

Link to comment
Share on other sites

Hi Lindsay,

But why clear all fields? Why not create a new record? Clearing all fields to re-enter data means that the record won't reflect the correct 'date created' nor correct Creator name (if you use those auto-enter features). Can you explain a bit more of your process? :wink2:

LaRetta

Link to comment
Share on other sites

Hello all, thank you for your help! I did not want to create a new record everytime because the way I understand it, (or atleast have it set up) when I create a new record, it saves it, and I start building a database of records. The information I am inputting into this particular layout only needs to be printed once and then can be deleted forever. No need to keep a record of it! ( also, I don't use either of those auto features!) Is there a way to create a new record without it automatically saving the old ones? Thanks for your help!

Link to comment
Share on other sites

..... The information I am inputting into this particular layout only needs to be printed once and then can be deleted forever. .....

Interesting approach. Is this data that you are only keeping for a print, being imported as part of other data that is being kept?

If not, and it isn't needed for any other purpose, why are you putting it in there in the first place?

Lee

Edited by Guest
Link to comment
Share on other sites

Despite a record containing an exorbitant number of fields to clear, points in direction of a lesser normalized datastructure, could you however make one single field trigger for the rests behavior. What if all relevant field gets following autoenter (replaces...) attached to thier defs.:

Evaluate(Case(0;0);triggerField)

...which is easier to write than:

Evaluate ( "GetAsText ("")" ; triggerField )

--sd

Link to comment
Share on other sites

Good idea, Soren! :wink2:

But Evaluate() isn't needed, I don't think ... On textField: If ( not IsEmpty ( trigger ) ; textField )

All fields with this Auto-Enter (Replace) will clear as long as the field referenced (itself) is within the same table as trigger.

UPDATE: Also - can't the trigger be (should be) a global (within same table)? Ahh, comes right back to Comment's discussions of late. Powerful stuff...

Edited by Guest
Link to comment
Share on other sites

Point taken, Michael and my original suggestion also. I was just saying that Evaluate() wasn't needed specifically, if that was an option being considered. Agreed, create the record, enter the data, delete the record. :wink2:

Link to comment
Share on other sites

" still think that repeating the Clear Field script step is the best way. "

Depends upon how important it is. If it's critical that it be right, I'd rather use an Auto-Enter (Replace). Scripts can trash partway through.

UPDATE: And if only some fields should be cleared, why not use globals for those fields instead? Obviously they wouldn't contain data you'd wish to hang on to.

UPDATE: I, as Soren, question the process here. If there are that many fields to set and clear, something is amiss...

Edited by Guest
Added Update
Link to comment
Share on other sites

This topic is 5757 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.