Jump to content

Help in designing & Viewing database


This topic is 4817 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi.

Im building a database for organizing audio cd's meta data.

I have created 1 table with all the album meta data and i have created 1 table that has the data for each track in an album.

im trying to do in layout view that i can see all the data in the tracks table of a certain album

for example if i have an album id: #1234

in layout view i selected this album then all the tracks that are under album id#1234 will be shown in the same page with all their information...

Thanks a lot!

Link to comment
Share on other sites

Your structure is correct, an Album table (with a unique AlbumID) a Tracks table (with a non-unique AlbumID as a "foreign key", to match its parent Album. I do not know if you have the relationship between them built yet).

The typical way to view tracks of an album would in a "portal", on the "Form" view of the Album table. You need to learn about portals and the View options of any layout (there's 3, Form, List and Table; Form view shows 1 record, the others multiple records.

To put a portal object on a layout, you need a relationship for it. In this case the portal's relationship would be from the Albums table to the Tracks table, based on AlbumID (both sides). You'd want the portal to have enough rows for the maximum tracks of any album. Then put the fields (from the Tracks table, using that relationship) in the portal. The portal wizard dialog will let you specify them while creating the portal. It pops up when you drag the Portal widget off the Toobar onto a layout, when in Layout Mode (another term to know, the "modes").

There are 3 Modes: Browse (data entry), Preview (print view) and Layout (layout construction).

So that would show the tracks of the one (and only one) Album visible on the "Form" View layout. But to look at a list of Albums, you'd need another layout for the Albums table. You'd just the "List" View option, which shows multiple records as "rows" (which you can adjust the height of). A List view is generally where you do Finds (so you can see what got found at a glance).

The other thing you can do in the Body of a List view is to put a button to run a script step directly, or call a full script.

Two basic principles (maybe you know, but which are sometimes not understood by beginners, causing them to try weird things to do something that is built-in and basic):

The button knows which knows which record it's on.

Changing the view does not change which record it's on.

So, the button on the List view of Albums needs only 1 step: Go to Layout [ the form view one of an Album ]

That's the one with the portal; you'll see its Tracks.

It's generally a good idea to put another button on the form view layout, to Go To Layout [ list view of that table ]

This "list<->form" is the most basic (and used) navigation.

Link to comment
Share on other sites

This topic is 4817 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.