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 3 reply threads
  • 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.

    June 9, 2026 at 10:55 AM #54262

    Steve-Kai Vyska
    Participant

    Hi Brend.

    I was thinking about that, but the problem there ist, that you can only joint 1:many. that does not solve my problem, because I need to be able to split billings an there it get complicated, because I can only set one common field criteria. That ist the fun with many to many so that you can select which belongs to wich without self coded criteria. As I said doing it per hand works fine but I wanted to do it via script and that does not seem to word, when noch creating new record :(

    Have a nice day

    Steve

    June 9, 2026 at 1:46 PM #54263

    Steve-Kai Vyska
    Participant

    Hi Brendan,

    I think I found a solution using an extra form as an interface. I’ll put it hier, wehen it works. It would be cool if there would be a possibility tp populate these kind of joins.

    Steve

Viewing 3 reply threads

You must be logged in to reply to this topic.