iOS: Display linked child records?

Viewing 4 reply threads
  • Author
    Posts
  • June 11, 2021 at 10:56 AM #44598

    Redrock
    Participant

    My IOS database has a 1:many relationship set up with a parent and child forms. When viewing a record in the parent form, the linked field shows the number of linked records, with a “>” live link to the related records in the child form. All that seems to be working just fine.

    The question is, in iOS, how do you display all the linked child records within the parent record form, like this:

    Customer name: A Jones
    Address: 123 Main St
    State: USA

    Purchased Quantity Date Time
    widget1 2 1/1/21 16:56
    widget2 1 2/2/21 10:23
    widget1 5 3/3/21 08:14

    In short, can I create views and layouts in the iOS version of Tap Forms, and is there documentation on how to do this?
    Thanks in advance.

    June 11, 2021 at 1:57 PM #44599

    Redrock
    Participant

    p.s. I’m actually running iPadOS, if that makes any difference

    June 11, 2021 at 2:16 PM #44601

    Brendan
    Keymaster

    Hi Redrock,

    There’s no custom layouts function on the iOS version of Tap Forms.

    And linked records always display in a separate list on iOS. At some point I might change that to display like the Table field does, which displays inline on the parent record as a table of sub-records.

    So if you need to display things visually like that, you would want to use a Table field instead of a Link to Form field.

    Or alternatively, you could write a script which picks out a field from the Link to Form field’s form and displays that in a list of values on the parent record.

    Thanks,

    Brendan

    June 11, 2021 at 2:39 PM #44602

    Redrock
    Participant

    Well, that explains why I couldn’t figure it out. I actually wanted to populate the linked form from the parent, in addition to simply displaying them.

    I tried using a table, but while it pulled over the child record names, there was no data.

    Scripts, huh? Sigh. Could you please point me to a reference guide?

    Thank you for the reply!

    June 11, 2021 at 11:08 PM #44603

    Sam Moffatt
    Participant

    First step is to check out the JavaScript API to get a feel for some of the stuff available.

    Next stop I’d suggest is to check out T.L. Ford’s JavaScript tutorials.

    If video is more your jive I’ve got a YouTube channel with some resources including a intro to scripting and a script field deep dive. There is also a video on link to form fields and scripting that might help as well.

    The forum has a bunch of great examples of how to use the scripting in Tap Forms. There was a recent post on using Markdown for contracts which leverages a script field to generate some Markdown output including leverage a table field. From a scripting perspective, link to form fields and table fields behave similarly so anything that works with a link to form field will work with a table field and vice versa.

    Hopefully this helps!

    June 12, 2021 at 8:57 AM #44608

    Redrock
    Participant

    Thanks much for all the info, Sam. I appreciate it. I didn’t realize TF scripts use java. I won’t tell you how long it’s been since I’ve coded, lol.

    As a former MS Access and HanDbase user, I vote for a TF enhancement to have the ability to create views where linked records can be created, edited, and displayed with their parent records—it’s a basic relational database function that could put TF at the head of the pack.

Viewing 4 reply threads

You must be logged in to reply to this topic.