Well...it depends. You reference "related record" in your subject. Is Field2 is a related record based on a relation from Field 1 to another table? If so, you could make it an unstored calculation that will always update, or simply reference the related field directly.
If you want to script it, you'll want to
Capture the value of Field2 and Field1 in a variable
Make a New Window
Do a find on Field 1
Loop through the found records and Set Field 2
There's a collection of specific script steps for each of those general ideas.
Sorry for my wrong expression in title, it's just a flat table, I didn't create any relationship with other table, how can I do it?
I tried to script by using find mode, how can I locate back to my previous record?
DavidJondreau's idea is good. Did you try that?
In SQL, this would be a simple "UPDATE", but you need a SQL plug-in for anything other than SELECT.
UPDATE <table_name> set Field2 = '888' where Field1 = 'ccc'
Yes I tried.
After that, how can I go back to the 5th record?
Thanks, but how can I go to specific record number after I got RecordNumber is 5?
Ok, the latter of your answer just showed up, it works for me, thank you for your help!
1 of 1 people found this helpful
If you open a new window as DavidJondreau recommended, you simply close that new window when done and your current record in the original window has remained unchanged. That's why David recommended opening a new window before finding the records.
You also do not need to use a looping script. Once you have a found set to update, you can use replace field contents to assign the same value to all the records in your found set.
But the need to do this raises the possibility that a better design would be to put this value in a single record in a related table so that you only need update that value once for all the records in a given group.