December 17, 200718 yr I am stuck with this: I need a script to replace a field content in all found records. Lets say the field called "IsClient" in all found records should be replaced with "Yes". It works nice manual with the function "Replace Field Contents", but I cannot find a way to script it. Any help would be appreciated.
December 17, 200718 yr Author Just Solved this one: I selected the wrong script step. Here is the correct one: Sort Records [Restore] Go to Record/Request/Page [First] Replace Field Contents [No dialog; script examples::Serial Number; Serial numbers]
December 23, 200718 yr Hi Greg, A small thing but it isn't necessary to go to the first record before running Replace Field Contents[]. It will ALWAYS start at the first record (in the found set or the first related record) and replace all records. And in the case of serial (and in the current table), the first record will always receive the first serial you provide in the dialog box. ** This bit me when I first used it (and it's why I learned this) ... I thought it would replace everything at my cursor and forward and I accidently wiped out data in the prior records. ** If serializing related records, the serial will be applied based upon the sort order of the parent. Edited December 23, 200718 yr by Guest
December 23, 200718 yr ** If serializing related records, the serial will be applied based upon the sort order of the parent. AFAICT, the serial will be applied based upon the sort order of the parent - then the sort order of the relationship.
December 24, 200718 yr I DO want to mention that one should only use = here when firing from the parent record. Otherwise the results can be strange, particularly if one uses the cartesian join. It can't seem to keep it's mind straight (kinda like me). :laugh2:
December 24, 200718 yr Indeed it's weird. (I am of course referring to Filemaker's behavior only....)
December 24, 200718 yr Of course you are referring to FM - what ELSE could you possibly mean? Using cartesian, FM thinks it's supposed to multiply ... like most men. Okay, okay, I couldn't resist ... :giggle: Edited December 24, 200718 yr by Guest
Create an account or sign in to comment