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

Scripting a complex find and sort

Featured Replies

  • Newbies

I have a (Client) file in which I record basic information about therapy clients. In a related file (Reports), I have multiple fields that record outcomes and over time the status of each outcome for each client.

The (Reports) file can store outcomes in Initial Reports and at later dates in multiple Progress Reports and finally in a Discharge Report. In each report after the Initial Report, I want to retrieve all previous outcomes for the client and update the status of each outcome plus add new outcomes.

My thought is to establish a relationship from Client to Reports based on CLIENT ID concatenated with REPORT NUMBER. REPORT NUMBER will increase from 1 for each new report for that client.

My question is how do I retrieve all current and previous outcomes for the client in the current report?

I had thought to script a find in the related file (Reports) that retrieved all outcomes in this file in a subsummary layout sorted by REPORT NUMBER. The body part of the layout would contain other client information that does not change over the treatment course for this client.

Any suggestions or guidance would be greatly appreciated.

Figurski

Your "key" field is the key here (sorry !).

You've already realised that you can concatenate a primary and secondary content to provide a sub-group of related records.

You can also maintain multiple line entries in the "key" and FMP will see all of them as valid key entries, viz.,

contents of "key" field

CLIENT001

CLIENT001REPORT001

Now you can GTRR for either of the "keys" in the key field - thus you can get ALL your CLIENT001 records together, or just a specific report subset.

There is a limitation that ONLY the first 20 chars of an FMP key field are indexed, so make sure your key entries don't exceed this on any line.

This also works for MANY TO MANY relationships where the key fields in both files can have multiple keys and FMP will match them ALL.

You need some solid script routines to maintain the "keys".

Mind blowing !

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.