best way to relate these two databases

For HanDBase related topics that are not specific to one platform.

best way to relate these two databases

Postby gunther@gmcgt.org » Thu Jan 15, 2015 1:14 pm

I have two databases, one is people (name, gender, HUD generated ID number, race etc) the other is contacts (the people are homeless and I am seeing them on the street), Date, type of contact, place of contact, note. I want the hud generated id to automatically populate along with name, the contact database. What I was thinking I would be doing is finding the person in the person database, going to the contact database via a link/linked field, the HUD ID does automatically populate but I can't get the name to automatically populate via a relationship. I realize another way I could do this is create dbpopups in Contact database but that seems like a lot of extra work...while I am out on the street. Just want quick record of contacts as I move. The reason I don't link, on the HUD ID is that when I encounter a new person I won't know there HUD ID till I go back and enter them in the HUD database and I am afraid that I might screw up the relationship when I change the (temporary) HUD ID created in the field. I would appreciate your thoughts. BTW, I did read and reread the Link/linked vs Ralationship and have studied the time billing example. I tried everything I could think of.

gunther
gunther@gmcgt.org
 
Posts: 8
Joined: Sun Feb 12, 2012 2:23 pm

Re: best way to relate these two databases

Postby Brian_Houghton » Fri Jan 16, 2015 6:36 am

Hi Gunther,

Thanks for posting. You can accomplish what you need using a set of relationship fields.

In the main database, create a relationship for the hud id field. Configure the relationship to use the hud field in the main database, and then set it to relate to the hud field in the contacts database.

When you follow this relationship, any new record created in the contact database will automatically populate the hud field with the correct value.

Next, in the contacts database, add another relationship. Configure it to use the same hud fields as the basis of the relationship but then set it to show the name field from the main database. Doing this will automatically show the name associated with the hud in the primary database each time you create a new record in the child.

Hope this makes sense. I can send a sample if necessary.
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: best way to relate these two databases

Postby gunther@gmcgt.org » Sun Jan 18, 2015 12:12 pm

Brian,

Thanks for your response. The only hiccup I can think of to this is when I am out in the field collecting data and I enter a new person, who is later entered into the HUD database and a new HUD ID then generated which is then brought back to my person table. Do I mess up my relationship by changing the HUD ID at this point? I would think so. I was trying to think of a way to do it with you Relationship/Link example from tutorials. My experiments have failed and I have dropped back to using the DBPopup fields in my child table and then working from my child table to lookup info in person table. It works but does not seem space efficient. My thoughts where to Link from person database to linked contact database, could show last contact date, not that important. That part worked. And then setting up a related field from the Contact/service database that related via the link/linked field and copied the HUD Client ID, and perhaps last name for reference. This part has not worked. Am I misunderstanding how these relationship work?

Thanks,

g
gunther@gmcgt.org
 
Posts: 8
Joined: Sun Feb 12, 2012 2:23 pm


Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests