Using a Control to Filter Data between several tables

Hello,

I am new to Coda and I am trying to build a Doc to help run my mobile business. I have 2 Main tables, Dogs and Clients. I also have several small tables ie, zones, grooming van, groom time etc that link mainly to the Dog Table to keep the drop downs consistent.

I have made a new table of available appointments, which contain some of the same data that is listed for each Dog on the Dog table. Example - Blue Zone, Van1, Bath Only. I would like to set up a select control to choose the dog and then have the Appointment table filter to show exact matches, based on the criteria in their particular record vs what is in the record in the appointment table.

Is something like this possible??.

If so I would then pick one off the filtered appointments and somehow assign that record in the appointment table to that dog showing it is booked.

Thanks
Jimmy

Hi @Jimmy_Ernies_Dog_Spa, could you share your doc here or a copy of it with non private data so we can help.

Sure, What is the best way to do that? The Doc has non-private data for testing right now.

Ok here goes

Hi @Jimmy_Ernies_Dog_Spa

Please take a look at this and see if has you going on track.

I have added a column and a filter to the table

  1. Yes this is great. I can follow your logic and tie in other requirements as needed. Will the filter work with something such as groom time is less than or equal to, or will only equal to values work?

  2. I am also trying to add a button (I have been watching the help videos …lol) to book the dog when a appointment is selected from the now filtered table. This would remove the appointment from the open appointment table and place it on a booked table (or at least that was my plan). Is that possible? Will I be able to reverse the process from the booked table do you think? I added a booked checkbox that I thought could be actuated by the button and then be hidden to drive the booked table but I am stuck.

  3. I was following the videos when laying out the database and it seemed like the open and booked data should live on two separate tables because I ultimately need the data displayed on a calendar that can been seen on a mobile like google calendar preferably. I thought I could push the two calendars and overlay them to see open vs. booked appointments on the fly.

I can’t thank you enough for your help

Jimmy

  1. The filter will work with less than and greater than etc.
  2. I would add a column to to Appointment table that said - Booked or Available Your Button should toggle that, then you can filter to show Available slots only and another view to show all booked appointments.
  3. I would keep it as one table ( see suggestion above)

I understand about the views and that seems to make sense if I did not need the data updated.

I guess I was concerned about how to connect the button to a particular Dog (record) so their name would come up instead of “Open Grooming”, I added the second table because I thought it would be easier to “shift” the dogs info onto another table. We would like to be able to see any upcoming grooming appointments when viewing the record in the Dog Section.

Did you happen to take a look at the updated Doc to see if I was on the right track if I did make a second table?? Being a newbie it is hard for me to understand the limitations and how to ask a question I guess lol. Sorry to be a headache.

Jimmy

I’ll take a look at your doc in few. But take a look at https://coda.io/d/Copy-of-MEGA_dY-EGJTAmgO/Scheduling_suqHo#_luD5d - I have added a button there for you.

This is pretty much what I was thinking of. I can also filter the open calendar using the “available” check box to remove the appointments that are already booked.

Yup, hope this gets you going for now. Looks like a great doc!

Hi Again, I noticed you used the matches formula when you were helping me with my control filter.

I changed the grooming time to be <= an amount which now returns several possible values for dogs in the match dog column.

The filter is using the matches formula and if there are multiple dogs listed in the field it does not match. Is there a formula that searches a field and will return true if there is a partial “text” match or something along those lines? In other words looks at the three dogs Boomer Johnson, Link Smith, Cuff Smith in the field and will still return true if the pull down control has Boomer Johnson?

Thanks

Jimmy

This is totally possible. Can you send me a link and share the latest copy of your doc with mallika@coda.io so I can take a look.

Should be shared with you now. Thanks

I changed the filter to Contains. That should do the trick.

Works great!! Thanks for that. Is there a way to display a field from a table that has a control on the canvas? I am trying to get the dogs groom time to display next to their name after it is chosen from the pulldown.

Also, it this the proper way to ask for individual help or should I be emailing??