Relationships clarification

Viewing 9 reply threads
  • Author
    Posts
  • August 23, 2016 at 7:29 AM #18992

    John Harris
    Participant

    Greetings :)
    I am having trouble with my relationships and I’m in need of professional help.

    Scenario:

    I raise a record in table ONE. I then want to link this record to multiple records in table TWO.
    Then >
    I navigate to table TWO, select a single record and want to see a list of all the records that are linked to table ONE.

    QUESTIONS:
    1) Which field do I create in table ONE (one to many or many to many)?
    2) Which field do I create in table TWO so I can see ALL the links to records in table ONE?
    3) Where is the mysterious ‘show inverse relationships’ shown? In table ONE or TWO?

    I’m sure ‘show inverse relationships’ can solve my problem here, but I’m not really clear about the concept. ‘Inverse relationships’ ! … sounds kinky! Link TO and link FROM is also doing my head in – I thought a link was a link period.

    I love this app – but the relationship logic is a bit of a mind f–k.

    Your assistance most appreciated – John Harris

    August 23, 2016 at 9:48 AM #18997

    Brendan
    Keymaster

    You’ll want a Many-to-Many Link TO Form field in Table 1 which has Table 2 as the Link to Form property. Then turn on the “Show Inverse Relationship” on that field in Table 1. Table 2 will automatically be given a “Link FROM Field” which points back to Table 1. That’s all you need to do.

    You will have a relationship which can have multiple records in both directions.

    So Table 1 can see a list of child records from Table 2 and Table 2 can see a list of parent records from Table 1 which link to the selected record in Table 2.

    August 23, 2016 at 3:46 PM #19011

    John Harris
    Participant

    Hi Brendon,

    Thank you for your response. But I’m afraid I’m still not clear. Can I please clarify the following – so I can be clear.

    1) Which field do I create in table TWO so I can see ALL the links to records in table ONE? Does Tapforms create this list automatically in table 2?

    2) Exactly where is the ‘inverse relationships’ shown? In table ONE or TWO? Is this inverse relationship a list? Is it a look up? What exactly is it? Where is it – and why do we need it?

    To see a list of my linked records – how do I create that list? This is a two way thing but you are only describing one side of the picture. I really need to know both sides. Surely both sides should have a list.

    Bear with me please – John

    August 23, 2016 at 4:17 PM #19014

    Brendan
    Keymaster

    Lets try a practical example.

    You have a form with Movies in it and a form with Actors in it.

    You want to connect Movies to Actors, so you add a Link to Form field. Because an actor can perform in many different movies, you make that a Many-to-Many Link Type.

    Now, you visit an Actor record and you also want to see all the Movies that link to that Actor record. But you don’t see anything there to show that. That’s where the “Show Inverse Relationship” function comes in. On the Movies form for the Actors Link to Form field, you would enable the “Show Inverse Relationship” function by clicking the checkbox button there.

    Now when you visit the Actors form and select a particular Actor record, you’ll be able to see a list of all of the Movies that actor has performed in. Tap Forms manages the inverse relationship for you. You just have to enable it.

    Hope that helps clear up how that works.

    But to specifically answer your questions:

    1. When you enable the “Show Inverse Relationship” on the Link to Form field in Table ONE, Tap Forms will automatically create a “Link FROM Form” field in Table TWO. You don’t have to do it yourself.

    2. The regular relationship is shown in Table ONE. The inverse relationship is shown in Table TWO. The records in the inverse relationship in Table TWO will automatically show you the records from Table ONE which link to that selected record in Table TWO.

    You don’t need it. That’s why it’s an option. But it’s always nice to be able to see both sides of the relationship.

    August 24, 2016 at 3:09 PM #19048

    Frances Cherman
    Participant

    Very clear explanation, Brendan. Thank you.

    August 25, 2016 at 3:57 PM #19066

    John Harris
    Participant

    Hi Brendan,

    I’m on track now. But I think there may be a small bug. I’ve set up the relationship as explained.
    When I click the ‘view selected linked record details’ the link does not immediately appear. I click the refresh button but it is still not there. I then quite and open Tapforms – the link is now showing.
    Are you aware that there is a lag in displaying a link in table TWO?

    Cheers – John

    August 25, 2016 at 7:44 PM #19067

    John Harris
    Participant

    Hi Brendan,

    Thank you so much for taking the time to go through this with me. I think this is the best description of Show Inverse Relationships. Perhaps you could put this as a Frequently asked questions.

    John

    August 26, 2016 at 3:03 PM #19076

    Brendan
    Keymaster

    Hi John,

    If you could post or email me a couple of screenshots showing the progression of this bug I could better understand what you mean.

    Thanks,

    Brendan

    September 20, 2016 at 6:27 PM #19681

    bob
    Participant

    Hi brendan,

    Could you possibly post a few sample forms with relationships? Very simple to and from??

    (edit) i do see some samples with relationships ive imported from the form template exchange, but they are very complicated and i can’t make heads or tails of them…

    Thanks very much,
    Awesome job, awesome app!

    Bob

    September 20, 2016 at 8:13 PM #19694

    Brendan
    Keymaster

    I just posted a Projects template to the Template Exchange forum which has a bunch of relationships:

    Projects template showing relationships to other forms

Viewing 9 reply threads

You must be logged in to reply to this topic.