May 1, 200916 yr The current routine loops through records doing this: If [Count(Companies~Addresses.portal:_AddressesID) = 1 Addresses portal on the current Companies layout has a single record Set Field End If With many hundreds of records I'd like to speed up the routine by using the Constrain Found Set script step and then use Replace Field Contents to set the field. However I'm baffled in how to set the criteria in this situation. Suggestions? Appreciated.
May 1, 200916 yr Well you can always just do a find in the calc field itself but I am baffled by why you would need such a thing...
May 1, 200916 yr Why not just use the "Replace" function in the Browser window. Do a find for your criteria Enter the field and replace the data then do the Key Combation of Command = and then hit the "Replace" Lee
May 1, 200916 yr Filemaker does not perform calculations during find. You would need to define a calculation field for the count, and search in it for "1". However, in this case there you have another option: go to the Addresses table, find records that have duplicate values in the company foreign key field, show omitted only, and do a GTRR [match found set] back to Companies. I too wonder why you need to mark these records.
May 1, 200916 yr Author Well you can always just do a find in the calc field itself but I am baffled by why you would need such a thing... Two factors. A: The action is to be performed just on the current set of records, not on all records. And B: on only those records where there is just a single Address record related to the current Company record, not on records where there are multiple addresses in the portal. Does that make the situation clearer? How exactly would I do a find within the calc field itself? I am probably misunderstanding something obvious. Much appreciated.
May 1, 200916 yr Author Filemaker does not perform calculations during find. You would need to define a calculation field for the count, and search in it for "1". However, in this case there you have another option: go to the Addresses table, find records that have duplicate values in the company foreign key field, show omitted only, and do a GTRR [match found set] back to Companies. I too wonder why you need to mark these records. I'll give your method a try. In the meantime, I'm not marking these records. Rather I'm picking up a value in the Address table for each record that meets the criteria (is in the present set, has a unique Company ID in the Address table) and placing that value elsewhere for later use down the line.
May 1, 200916 yr Author However, in this case there you have another option: go to the Addresses table, find records that have duplicate values in the company foreign key field, show omitted only, and do a GTRR [match found set] back to Companies. Excellent! This set me on the right track. Much appreciated.
Create an account or sign in to comment