Related Tables

Viewing 2 reply threads
  • Author
    Posts
  • August 9, 2014 at 11:05 AM #10612

    John Dillon
    Participant

    I think that I have a good understanding of related tables in a database structure, but I am unable to figure out how the link to(from form) field works, notwithstanding researching the user manual and forums. Do you have a sample download? Apparently, tables are not linked via with a related field. I also don’t understand what an inverse relationship is.

    August 9, 2014 at 2:41 PM #10613

    Brendan
    Keymaster

    Hi John,

    The Link to Form field comes in 2 varieties. One to Many and Many to Many. A One to Many field is appropriate when you don’t need or want to share the same child records with other fields or other forms. A good example might be a Call Log that you keep for a list of clients. You would have 2 forms in that situation. A Clients form and a Call Log form. You would add a Link to Form field to your Clients form which links to your Call Log form. You could call that field “Calls” or even just leave it at the default “Call Log”.

    Then every time you call a customer, you would add a new Call Log entry and record the details of the call. From then on you could visit any customer in your Clients list and see a complete log of calls you’ve made to each of your customers.

    An example of a Many to Many link type would be something like a Movie Library that links to a list of Actors. An Actor can perform in many Movies and a Movie can have many Actors. With this kind of link you would add some movies and some actors to the different forms and then link them together by selecting from the list of Actors when editing a Movie record.

    The Show Inverse Relationship would add a back link from the record you’re linking to back to the parent record that you’re linking from. So in the Call Log example, if you were to look at an individual Call Log record, you would see which Client that Call Log entry was related to. In the Movies example, if you were looking at an individual Actor record, you could see a list of Movie records they were linked to. And if you selected a specific Movie record, you could see the list of Actors who performed in that movie. The inverse relationship is managed automatically for you by Tap Forms. You only need to click the “Show Inverse Relationship” button to activate it.

    When you click on the Show Inverse Relationship button, Tap Forms will automatically add a “Link FROM Field” to the form you’re linking to. For example, in the Call Log example above, when you enable Show Inverse Relationship on the Link TO Form field on the Clients form, Tap Forms will automatically add a Link FROM Form field on the Call Log form which links back to the Clients form.

    I hope all that makes sense.

    There are a few forms in the Tap Forms Exchange forum which I believe may have some Link to Form fields in them.

    Thanks!

    Brendan

    August 16, 2014 at 8:43 PM #10653

    David Oakley
    Participant

    As a new user, I am struggling with this one too. Normally in a relational database, you avoid many-to-many relationships like the plague.

    Take the case of car rentals – there are many cars and many renters who could well be repeat customers. In (say) Access or Filemaker, you fix this by having a third table called perhaps Contract with a unique number, date-and-time etc fields as the key plus links to the Renter and Car tables (I am simplifying). So the Renter table has a one-to-many relationship with Contract. The car table also has a one-to-many relationship with contract.

    Look at Renters and you will see for any one renter, many contracts each referring to a different date and a different car – or maybe the same car: it doesn’t matter. Likewise look at any car and you see its rental history. Look at contracts and you see all your business.

    I don’t seem to be able to replicate this in Tap Forms (using iPad version as a tryout).

    Dave

Viewing 2 reply threads

You must be logged in to reply to this topic.