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.

Seeking help building a list

Featured Replies

Hello!

Thanks in advance for any help that y'all can offer. I'll try to keep it simple and illustrate my problem with a contrived example.

I have a set of records from a veterinary clinic for dogs. Each record contains the dog's name, the owner's name, and the breed of the dog.

Because the system is structured from the perspective of the patient (the dog), there's a record for each dog. Because a person can own multiple dogs, there might be more than one record that contains the name of a given owner.

I need to be able to create a query dialog for a user to enter a specific breed of dog and get a list of everyone who owns a dog of that breed. But, if a person owns more than one dog of a given breed, I only want to see their name on the list once. I don't care how many of a given breed a person owns, I just want a list of unique owners of a given breed.

I've tried this with the List function and with summary/sub-summary reporting and I can't figure out how to avoid duplicate entries for those people who have more than one dog of a given breed.

How might I attack this?

Edited by Guest

Okay, assuming that you have two tables:

People Table

PersonID

PersonName

g_breedType ( a text field with storage set to global under field options to accept your query )

Dogs Table

OwnerID

DogID

DogBreed

... and assuming you've related your dogs to your people via PersonID=OwnerID

From your people layout perform a search as such:

Show Dialog[ Enter a breed ; Field: PeopleTable::g_breedType ]

Enter Find Mode[]

Set Field[DogsTable::DogBreed; PersonTable::g_breedType]

Perform Find[]

If[Get(LastError) <> 0 ]

Show Dialog[ Error ; no dogs found matching specified breed]

End If

You will then be left with only the people with one or more dogs of your specified breeds.

  • Author

Thank you for your response. I'll jump into this and see how it goes!

Create an account or sign in to comment

Important Information

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

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.