Create relationship between records via an api request

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • In Progress
Hi there,

We are using the PHP SDK for interacting with the QuickBase api and have successfully managed to add new records using API_AddRecord.

The problem we have is there doesn't seem to be a documented way of creating relationships via the api.

For example, we would like to create a new entry record and store the questions/answers they've submitted in a separate table, linked to the entry by Record ID so that all data can be pulled through and filtered from the entries table in the QuickBase dashboard.

Entries table

RID: 34
Name: John Smith
Age: 45
Nationality: British

Answers Table

RID: 101
Question: Do you undertake moderate exercise 2-3 times a week?
Answer: Yes
EntryID: 34

RID: 102
Question: Do you smoke?
Answer: Yes
EntryID: 34

Has anyone managed to carry this out via the api before? Any help or pointers would be appreciated.

Thanks in advance,

Nick

Photo of Digital Team

Digital Team

  • 70 Points

Posted 7 months ago

  • 0
  • 1
You seem to be confusing creating a new relationship with simply connecting the child child to the parent by populat8ng the field Typically named something like

[Related Parent] or in your case probably called [Related Entry]

I don’t do that scripting work myself, but I assume when you use the API to create the Entry it will respond with a success response and provide you with the [Record ID#] of thentry. Then you use that value to populate the [Related Entry] field in all of the child Answers records,