Jump to content

Constrain Found Set problem


This topic is 5468 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5468 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.