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

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

Recommended Posts

Posted

Can anyone help me create a script that would accomplish this? I want to strip all data out of a record except for one field. Is this do-able?

Thanks

Posted

You will have to play with it, but FileMaker does have a Design Function name Field Names ( FieldNames ( dbname , layoutname ) )

If you can pull it off, by doing a Set Field into a Global/Useless field, then you could blank out every entry except the one you want to save.

Other option is to create a new record & carry over the one value you have.

Posted

There is no easy way to do this that I'm aware of. But, it is doable. How many fields are in the table you are working with?

If it's not too many, lay out all of the fields (except for calculated and summary types) on a separate layout EXCEPT for the one you want to keep. Create a new (text) field named NameTemp (not needed on this layout). Then run a script that looks like this -

Freeze Window

Go to Next Field

Select All

Cut [select]

Set Field ["NameTemp", "Status( CurrentFieldName)"]

Loop

Go to Next Field

Exit Loop If ["Status( CurrentFieldName) = NameTemp"]

Clear [select]

End Loop

Basically, what this script does is goes to the first field on the layout (in order of the tab order), sets the fieldname of the first field to "NameTemp" and clears the contents of said field. Then it loops through all of the other fields and clears them as well. When it gets back to the "first" field, it stops. So make sure the same field is not shown twice on the layout, or at least make sure the duplicate isn't in the tab order.

Posted

Aha! OK, I figured it out. Thanks guys! I tried what you said Bret, but it didn't seem to work, I probably missed a step somewhere. But I just made a script in the master file to go to the current record, then perform an external script in the database i wanted the cleared fields. In that script I just used the Clear script on all the fields I wanted to clear, and then minimize window. Works perfect! Thanks again!

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