Populating a Subform (Many-to-Many Relationship) via Script

Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch Forums Script Talk Populating a Subform (Many-to-Many Relationship) via Script

Viewing 1 reply thread
  • Author
    Posts
  • June 7, 2026 at 3:30 AM #54255

    Steve-Kai Vyska
    Participant

    Hello everyone,

    I have a form called **Rental Claims** which contains a subform called **Bookings**. The Bookings subform is populated by a script that imports transactions from a bank statement file. This part is working well.

    When I work manually, I can use the selection dialog in the Bookings subform to view existing booking records and assign them accordingly.

    My question is: **How can I perform this assignment via script?**

    I cannot simply create the bookings directly in the script because I may need to assign multiple bookings to a single rental claim, or split a single booking across multiple rental claims. Therefore, a **many-to-many relationship** would be ideal, but I have not been able to create these assignments through scripting.

    Has anyone done something similar or can point me in the right direction?

    Thanks in advance for any information or suggestions.

    Steve

    June 7, 2026 at 6:59 PM #54259

    Brendan
    Keymaster

    A Join relationship is the same as a Many to Many except it is managed by a common field in the parent and child forms. Perhaps your script could just populate the common field? Then Tap Forms establishes the relationship for you based on matching values in the matched fields in both forms.

Viewing 1 reply thread

You must be logged in to reply to this topic.