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.

Conditional list in a portal

Featured Replies

  • Newbies

I have a list of Dogs - each dog has one vet; but each vet could be attached to many different dogs.  So I have a join table between the two so that: Dog - dog vet - VetClinic.  In the dogs layout for entering I have a portal that should allow the person to pull down a list of vet clinics to choose which one their dog goes to.

 

The choosing of a vet clinic (dog id links to dog idfk in join and vet clinic id links to vet clinic idfk in join) isn't a problem, all the vet clinics are there, but I can't figure out how to make the phone number and address for that vet clinic ONLY show up in the next fields in the portal; I can only get it to display all the phone numbers/addresses for all the vets, not the chosen vet.

 

I don't think I understand conditionals :)

I don't think I understand your description. If "each dog has one vet". then what is the join table for? It also doesn't fit this part:

 

 In the dogs layout for entering I have a portal that should allow the person to pull down a list of vet clinics to choose which one their dog goes to.

 

Again, if each dog has one vet, why does it need to go to multiple clinics?

 

 

It's also not quite clear what (If any) is the difference between a vet and a clinic. Does one clinic have many vets?

  • Author
  • Newbies

One vet clinic has many vets; I suppose I should have been clearer.  I haven't started the vets themselves yet, I'm still trying to figure out how to get the vet clinic, vet clinic phone, and vet clinic address to automatically enter after choosing the name of the vet clinic.

 

Once I figure that out, I'll work on individual vets.  I'm still a bit confused about when to use join tables too perhaps

 

Thanks!

One vet clinic has many vets

 

If each dog has one vet, and each vet has one clinic, then you should have three tables arranged as:

 

Clinics -< Vets -< Dogs

 

There are no many-to-many relationships here, hence no need for join tables.

 

 

In the simplest implementation, you would choose a vet for a dog and the vet's clinic would become related automatically by association. In a slightly more complex one, you could choose the clinic first, then select a vet from the chosen clinic's vets. For this, you would need to add an auxiliary relationship between Dogs and (another occurrence of) the Clinics table.

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.