auto allocate child to parent record

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
So i have an external application that posts a new record to a table (Job cards) via an API.  I want to have this record automatically allocated to the parent record (Jobs).  The record that gets posted already has the unique job number from the parent record.  Its basically a matter of simply taking that number and allocating it to the related job.

Can this be done via a formula field?  or even a button that searches the unique job card number and allocates it to the parent
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
You can do this a few different ways.  It depends on what functionality you want down the road.

Option 1:
(this will only work if on your "Jobs" table the key field is the unique job number you mentioned)
Make the [Related Job] field that is part of your relationship a "Formula-Text" field and make the formula use the unique value from the API import.
Pros:  The child records will be automatically associated with the Job.
Cons:  You can never change that back, and have all the associations stay.  This will also affect all connections retroactively.

Option 2:
Make that [Related Job] reference field be conditional. Where that unique number is the driving factor.
Pros: You can have always turn off that conditional restriction if things change down the road.  But at least it only one item in the drop-down menu.
Cons:  You have to manually select the related job.


If you have any other details about this, we could possibly work a different angle.
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
this makes sense.  I haven't enabled the API import yet, so there is no data in the child records - I will try option 1 and see how it works.  some more info:

* Job management system where we create jobs in quickbase and send those jobs to a user in the field in an external app.

* technician uses a completely different application to record his job card details (including the adding of the unique number) and submits this job card.  we use Zapier to drive the delivery into the child table.




 
Photo of Ricky Norton

Ricky Norton

  • 444 Points 250 badge 2x thumb
Just curious, what outside system are you guys using?
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
* Field management app - Custom application built in Javascript
* Data collection: Device Magic - www.devicemagic.com