Creating new row with Link to Table

Sorry for the many questions! I’m trying to get my head around the logic, but I’m obviously missing something.

I have 2 linked tables: “Tickets” and “Tasks”.
I want to create page in the App Builder to add a new Task. So I create a form. At this stage, it has 3 fields:

  • Name
  • Notes
  • Parent Ticket
    The parent ticket field is the linked field (liked to the Ticket table).

But if I put in a valid ID for the Ticket table in this field (eg 38) and submit, I get the (now dreaded) “Invalid Form”.

If I submit the form without that linked field, it’s fine - but of course the row isn’t linked to the corresponding ticket.

I’m racking my head trying to work out how to do this correctly.

Thanks again for any assistance.

Hi @spook! This should be working correctly in v1.24, which version of Baserow are you running?

I have the following setup, based on what you described:

  • Database builder
    • Table Tickets with fields:
      • ID (auto number)
    • Table Tasks with fields:
      • Name (single text)
      • Notes (single text)
      • Parent Ticket (link to table)
  • Application builder
    • Page with a form container.
    • This form container has two input text elements within it (Name and Notes).
    • On submit, the form will create a row to table Tasks:
      • Name (database) maps to my text input Name
      • Notes (database) maps to my text input Notes
      • In Parent Ticket I entered 1.

When I preview my application, enter a Name and Notes, a row is added to Tasks and the Parent Ticket points to ticket 1.

In the not too distant future it’ll be possible to populate a dropdown with the Parent Ticket data, so you don’t have to manually enter 1, and the user filling in the form could choose which ticket the task relates to.

I hope this helps!

Sorry again for the late reply! Been a busy week.

Yup running the latest v1.24. I’m not sure what I’m doing wrong.

So I have 2 tables: “Tickets” and “Tasks”.
Tasks has a “Link to table” field called “Tasks Tickets” which links to the Tickets table:
image

I create a new row in my “Tickets” table:

It currently has no “Ticket Tasks”. The ID is 41.

I’ve create a simple page in the Application builder:
image

I added 3 text fields and a button:

The button action is:

I preview the page, enter the ticket ID and get “Invalid Form”:

If I don’t enter anything in “Parent Ticket ID” the form works and a new task is created:

In the actual Baserow database, I can create a new task and choose the parent ticket, no problem:

What am I doing wrong?

Hi Spook,

I think I understand what may be happening here. Instead of sending the rowID 41 in that form, you would need to send the value of the first column in the table instead, which in this example of yours would be Test

I do agree that this is a confusing interaction and we will review this internally to avoid this confusion.

Please let me know if this resolved the issue, if not, I’d be happy to dig deeper on this.

Ahh of course! Yes that did it. Thanks so much! I get a little confused because sometimes it required the row Id (like when using “Get a Row”) and others the first column. I have to get my head around when each is needed.

Thanks so much for your patience and guidance. I still have more questions, but I feel I can only post one at a time! Let me know when you get sick of me.