Which file needs the relationships?

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Thu Sep 02, 2010 2:54 pm
Hi John:
I've added two tables to my data file: Rxs and ContactRxs. I've done that because I want to track which medications (Rx's) a patient is taking at any given time.

I relate Rxs to ContactRxs as follows:
Rxs::id = ContactRxs::Rx_id
And I related Contact Rxs to Contacts as follows:
ContactRxs::Contact_id = Contacts::id

Now, to display a portal showing current medications on the Contacts layout, I add these two 2 TO's, with the above-described relationships, to the Complete (interface) file's graph.

My question is this: does my SeedCode Data (data) file also need to contain those two TO's with the same relationships?

Yours,
Jim
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu Sep 02, 2010 4:41 pm
Good question. Often, no. The data file only needs table occurrences tied together if you have lookups, calcs, or auto enters that need these relationships. If you are just showing portal data, or working the relationships using scripting, that all happens in the interface file.

Further, if your totals use SummaryField instead of Sum() calcs, you can often dispense with managing a graph in the data file as well.

We often leave a basic graph in the data file in case someone wants to create a lookup, etc. down the road, but your portals won't be using them.
John Sindelar
SeedCode
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Thu Sep 02, 2010 5:24 pm
Super helpful as usual. Thank you John!

Return to SeedCode Calendar

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: