Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Relational database query


Recommended Posts

I'm tying myself in very fine knots here, with what I'm sure is something with a ridiculously simple solution.

I want a database of clients, each of whom have treatments. I want to be able to add treatments as appropriate, and sometimes display only the treatments for a particular client.

At the moment I have two tables, one for 'clients' and another for 'treatments'. I have a client ID# in each table, which is linked by a relationship.

If I set up a layout for the 'treatments' table, it displays ALL the treatments I have recorded - in other words for all clients. How do I get a layout which only displays treatments for one particular client?

And related to this, I would like each client to have an automatically-generated treatment 'session' number - so client 'Fred' (client ID#1) has a list of treatments on different dates, starting with session 1, and 'Sam' (client ID#2) has the same. I have set things up so each client gets an automatically-generated ID# (incremental by 1 as each new client is recorded) but when I do the same for 'treatments', obviously the treatments table just does the same thing, so I end up with a list of treatments (for all clients) with each record sequentially-numbered, but that's not what I want.


I'm sure I am missing something so fundamental that you can only stare, open-mouthed, at my naivety. And apologies to anyone reading this who's already tried to help! And I'm sure what I want could be achieved with the use of scripts, but I just feel there must be a simpler way I'm missing...


Eternal gratitude and good karma to anyone who can point me in the right direction.

Link to comment
Share on other sites

Generally speaking, you don't make a layout that displays only certain data, you either do a Find which isolates certain data from the well of all data, or you make a script that does that whenever you click a button, or you make a portal from the Client to the Treatment showing only that client's treatments.


Layouts are interfaces that display all the records that are in that layout's native table.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use