jdu98a Posted September 13, 2011 Posted September 13, 2011 The ability to modify a particular field based on a calculation is great, but if you then want to transfer that value to all the records in the found set you still have to hard code the field you want modified.
Matthew F Posted September 23, 2011 Posted September 23, 2011 Seriously! Having to loop over a bunch of records to set the same field in each to a particular value is silly. Also its silly that we have to hard code relationships into our relationship graphs when they may be used only sporadically in a script or a value list. My relationship graphs soon start to look like circuit boards when the core relationships are quite simple. If we could define relationships programatically, e.g. in a script or function, then we could leave the relationship graph for the heavy lifting.
bcooney Posted September 23, 2011 Posted September 23, 2011 Having to loop over a bunch of records to set the same field in each to a particular value is silly. He's complaining that Replace requires a selected field, rather than allowing you to specify the field by calc. He's not complaining that he must use a loop. However, Replace isn't very multi-user friendly, so a loop is necessary if you are concerned about record lock or are attempting any sort of transactional scripting. If we could define relationships programatically, e.g. in a script or function, then we could leave the relationship graph for the heavy lifting. This is a nice idea. It reminds me a bit of Ray Cologon's discussion of utility relationships.
Matthew F Posted October 18, 2011 Posted October 18, 2011 Let me try that again.... I guess an alternative to 'Replace', that does not need to be hard-coded, is 'Set Field by Name'. However, the latter requires one to loop over all of the records in the found set, which seems rather silly. Did I get it right this time?
bcooney Posted October 18, 2011 Posted October 18, 2011 "requires one to loop over all of the records in the found set, which seems rather silly. " Silly? Almost necessary in a multi-user environment.
comment Posted October 18, 2011 Posted October 18, 2011 I guess an alternative to 'Replace', that does not need to be hard-coded, is 'Set Field by Name'. It's not the only alternative: you could also select the field (assuming it's on the layout), either by looping among the fields or by going to object - then call Replace Field Contents[] without specifying the field.
Recommended Posts
This topic is 4855 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