Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted (edited)

I would like to duplicate the data in a field to a different field for a found set of records.

Is there a way to do this besides copying and pasting the data one record at a time?

The field needs to remain editable, and the copy/paste can effect only the found set of records.

Edited by Guest
Posted

Replace Field Contents can do this, but - are you sure you really need to do this? Note that this (or any other method) can fail if some of the records happen to be locked by other users.

Posted

duplicate the data in a field to a different field for a found set of records.

Find the record with the field data you want to duplicate. Place your cursor in the field then run your script of:

Set Variable [ $fieldData ; YourTable::YourField ]

... perform the find to isolate your found set

Replace Field Contents [ by calculation ; newField ; $fieldData ]

Back up first. And remember to trap for record locking if the file is being served, ie:

Set Error Capture [ On ]

Replace Field Contents [ bla bla ]

If Get ( LastError )

... or

If ( Get ( LastError ) = 201

Posted

It's easy when one is - what's the word? - ah, yes: concise. :

But I thought they wanted to duplicate the data "internally" in each record:

Replace Field Contents [ Table::Targetfield ; Table::Sourcefield ]

Posted (edited)

Oh. <--- uber concise :laugh2: (true, not nearly as good a comeback)! Oh wait! Mine offers depth!!!!

It looks like I misunderstood their need. Then the request implies data shuffling and I would wonder why the need has arisen.

Roduenas? Is this a one-time cleanup issue or is it an ongoing process? If strictly for cleanup then sometimes we do what we need to do; if for on-going process, I would question why it is needed.

Every time you move data - whether from one field to another; whether from one record or one table to another; whether importing, pushing ... it all indicates manipulation which can break in the middle of a script with power outage, User performing 3-finger-salute etc. The least you touch data the better you are.

Edited by Guest

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