Skip to main content
Question

Table relationship with a formula field in child table

  • November 15, 2023
  • 0 replies
  • 353 views

Forum|alt.badge.img+8

I need some help thinking through this architecture.

My table 'Asset form' collects data related to company assets. My other table, 'Asset Approvals' will collect approvals for these asset changes.

Now the data for these assets ('Asset form') is going to be collected via GRID EDIT mode; so a bunch of Assets will be clubbed together and will require only one approval. I have created a formula field 'Change Req ID' that is a concatenation of person creating the request and date and time. So ideally I want to create a one to many relationship between the 'Asset Approvals' table and the 'Asset form' table but link them using the 'Change Req ID.'

So from the 'Asset Approvals' form I would like a drop down of all 'Change Req IDs' (which would comprise of many Asset form records), choose one and upload my approval attachment. This should then show up on all Asset forms as an attachment that has that 'Change Req. ID'.

What's the best way to achieve this?

Thanks

deepa



------------------------------
Deepa Prashant
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9

I would suggest one of two routes: 

Route (1): 

Rethink the idea of how you're grid edit'ing to enter the asset forms, and put them into a 'Asset Form Request' Container that is a record that can bind all of your Asset Forms underneath an umbrella record. The structure would be Asset Form Requests have many Asset Forms. You can set it up that users add a record and then use an embedded grid edit form to enter each Asset form. 

Doing it this way means that its guaranteed that all of the Asset forms are bound together. You would then make the 'Approval' just a subset of fields as part of the Request record instead of another (3rd) module. You can have it such that the User can submit the Asset Form Request for approval and log those fields, then have the approver sign off and attach it in field on the Asset Form Request and call it a day .

Route (2): 

When you save the grid edit and commit the Asset Forms, have a Pipeline pick up those events, and then if the Approval Record for that Change Req ID doesn't exist already, create a new record in your Approvals table. In that table, set the key field to be the Change Req ID. 

When you make the relationship, instead of letting Quickbase create a new 'Related' field as the foreign key, set the foreign key to be your Change Req ID field so that QB will bind it together through the standard relationship. 

I would raise one concern with going Route (2) in that how do you alert the approver(s) that they need to sign off? Are your uses able to enter via grid edit and then make changes afterwards that might impact the approval? You will likely need some way to have the user 'submit' the handful of Asset Forms when they're ready, which would be better under the structure suggested in Route (1). 



------------------------------
Chayce Duncan
------------------------------

Forum|alt.badge.img+1

As a follow-up to this question, the embedded grid edit report that shows up displays only 4 empty rows. We have use cases where the analyst needs to fill in 200+ rows and would like the ability to copy-paste that many rows into the embedded grid edit report. 

See above empty report. So when I try to copy-paste more than 4 rows, only 4 rows of data sticks. This would make it very laborious to copy 200+ rows as it would have to be done 4 rows at a time. 

Is there a work around for this?

Thanks!

Deepa