Relationship and Link/linked question

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

Relationship and Link/linked question

Postby moneil » Wed Apr 14, 2010 10:07 pm

I'm building a shopping list database. The parent database has (among many other fields) need (check box) item (test), description (the field I have the question about), and detail (link), which goes to a details database where the linked field is the item name from the main database.

In the main database I'm keeping the "items" fairly generic, i.e. "corn". Then, linking to the details database where I can have individal records for different variations on the main item, with store and price information. In the "details" database the first field is the item (linked), than a description field (text) where I differentiate each record (brand, canned, fresh, frozen, organic, etc.).

When I check something as needed in the main database I may want to leave it at that (i.e., just corn), or, I may want to note what kind of corn (fresh, frozen, canned, etc.) in the description field. I have a "clear field" tab on the form so I can clear the "description" field after each shopping trip.

So I won't have to manually type in the description of a needed item, I wanted to fill in the descripton field of the main shopping list, with the description of an item from the "details" database.

I've tried two approaches.

At first I made the "description" field in the main database a DB Popup field (with the details db being the one that popped up). That worked well, except I needed to manually search, or filter, to get to the relevant item. The previous question in this forum regarding DB Popup fields was very relevant, and having it work in the future as the poster asked would work well for my application.

Then, I tried setting up the description field as a relationship with the details database, with the relationship being the item name (which is a text field in the main database, and a linked field in the details database. However, this didn't work ~ when I hit the tab to open the details database (as a relationship), no records appear (even though records have been entered, as links).

I'm guessing that it isn't possible to have a relationship between a text field and a linked field, but thought I'd ask to see if I'm doing something wrong, or if there is another approach I should try.
moneil
 
Posts: 54
Joined: Fri Dec 11, 2009 10:15 am

Re: Relationship and Link/linked question

Postby dhaupert » Sat Apr 17, 2010 11:27 pm

Hi there,

Sorry for the delayed reply. I think the DB Popup solution would be best. You can actually type some or all of the value before selecting the popup selector and on most versions of HanDBase, it will do a search to find the first match of that.

You definitely can't use a relationship between a link and a text field. The internal formats are much different.

I'm not sure of any other approaches to something like this- a relationship can show a value from the other database, but no way to override this and change it. Seems like DB Popup is your best option!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am


Return to HanDBase General Discussion

Who is online

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