Greg O'Connor Posted December 17, 2007 Posted December 17, 2007 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.
Greg O'Connor Posted December 17, 2007 Author Posted December 17, 2007 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]
LaRetta Posted December 23, 2007 Posted December 23, 2007 (edited) 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, 2007 by Guest
comment Posted December 23, 2007 Posted December 23, 2007 ** 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.
LaRetta Posted December 24, 2007 Posted December 24, 2007 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:
comment Posted December 24, 2007 Posted December 24, 2007 Indeed it's weird. (I am of course referring to Filemaker's behavior only....)
LaRetta Posted December 24, 2007 Posted December 24, 2007 (edited) 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, 2007 by Guest
Recommended Posts
This topic is 6240 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 accountSign in
Already have an account? Sign in here.
Sign In Now