March 25, 200916 yr Newbies 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 March 25, 200916 yr by Guest
March 25, 200916 yr 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.
March 25, 200916 yr 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
March 25, 200916 yr 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 ]
March 26, 200916 yr Oh. <--- uber concise (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 March 26, 200916 yr by Guest
March 26, 200916 yr It looks like I misunderstood their need. Or I did. Either way, some clarifications would be useful - esp. regarding the purpose.
Create an account or sign in to comment