Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Constrain Found Set problem

Featured Replies

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.

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

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

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.

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

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

  • 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

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.