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.

Jumping Between Records

Featured Replies

I am setting up a database for a small doctors office. Right now i am working on the client management table and layout. I would like to create a dropdown menu that has all the last names of the patients ans when you select a patient it switches the current record to that patients record. Does anyone know how to accomplish this?

Welcome to FM Forums!

It should be simple using script trigger OnObjectModify[] so it will fire upon data change selection in the drop-down. Normally I'd suggest using the PatientID instead of last name so that the jump is to a specific patient because, if there are more than one Mr. Brown, only one will show in the value list and you won't know which one.

But you might have more than one William Brown as a patient as well, so you'd have to include city or some other unique designator in the value list. Because of this possible duplication of unique patients, using last name would work better and, if there is more than one resulting patient, provide the User with a list (which shows details about the patients) for the User to select further.

Your value list would be called All Patients and you would select 'from values from field' and 'all values' and you would select the LastName field in the left side. There is no need to display anything else. Attach this value list to a gLastName (global text field explained in next paragraph). YOu can also attach 'auto-complete' to this drop-down.

There are two ways to jump: GTRR ( Go To Related Record ) and Perform Find. Since this will be a simple find involving only the current table and since LastName can be indexed, I would keep it simple and perform a find. Create a global text field called gLastName and attach your value list to it.

Script attached would be (and this process is untested):

Set Error Capture [ On ]

Enter Find Mode [ ] [color:gray]uncheck pause and uncheck restore

Set Field [ Patients::LastName ; gLastName ]

Perform Find [ ]

If [ not Get ( FoundCount ) ]

Show Custom Dialog [ "No records found" ]

Exit Script

End If

[color:gray]... records found. If only 1 record found, go directly to patient chart layout otherwise, go to a list which shows patient's LastName, FirstName, Address (and anything else which would make it simple to select the exact patient). Have a button on the row to jump then to that patient's chart.

If [ Get ( FoundCount ) = 1 ]

Go To Layout [ Patient Chart ]

Else

Go To Layout [ List layout ] so user can select specific patient

End If

  • Author

thanks, with your explanation i finally got it to work. i did actually end up using clientids instead.

thanks again

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.