Forum Discussion

Lee_SGilmore's avatar
Lee_SGilmore
Qrew Cadet
8 years ago

webhook to edit record it that was just created

I'm trying to use a dynamic form rule to auto assign a unique tracking number based on several fields. One of those being the Record ID. When a new record is saved, the dynamic form rule triggers prior to the Record ID being assigned. As a result, I have to save the record a second time to get the value I'm looking for in the unique tracking number field. Perhaps I need a webhook to trigger directly after the record is saved to modify my record again to trigger the dynamic form rule so it can capture the newly assigned Record ID? I want to prevent asking my users to save a record twice in order to see their tracking number.

*Forgot to mention, I'm unsure how to create webhooks for this purpose
  • Hi Lee,

    Dynamic Form Rules only fire when a record is opened in a specific form while being edited. It doesn't typically work off of Actions, Webhooks, and functions like Grid Edit where no specific form is being used but instead the data is being worked with outside of a Form. 
  • Dynamic Form Rules will only fire when a human user manually edits a form in a browser window and saves.

    Can you confirm which field is the Key field is to this table?  Is it the [Record ID#] field?

     
  • I've modified my key field to be the [ABR Number] field. Since I will no longer have any new "Old" records, all [Auto ABR #s] will have the Record ID contained in them making sure the [ABR Number] field is unique. However, I'm relying on the dynamic form rule to post the value in the [New True ABR#] to the [ABR Number] field after saving. I've not yet been successful having the QB Action modify the [ABR Number] field.
  • Can you remind me why the Key field needs to be the [ABR Number] field and not just the [Record ID#] field.

    The Action will not be able to work in this situation since the Action fires only after the record is saved, but the save cannot cannot fire successfully since the Key field is blank for new record and blank is not a valid value for a Key field.
  • I believe I built it this way so I could use that in my table relationships. Since I was importing old data from an old Access Database, I had the [ABR Number] in all my Access tables. This connected my data quickly without having to assign a related value. Perhaps there is a better way to do this.
  • If there is no more Old data ever going to come into the app, you could change the Key field back to Record ID#, and then the unique tracking # would just be a formula field.

    I would suggest doing this first in a Copy of your app, if you do not have much experience with change key fields.  Quick Base will maintain all the connections between the Parents and the Children.

    Normally the only Fixing that needs to be done after QuickBase makes its changes is on the child forms, the fields for choosing the Parents sometimes needs to be fixed on the form.
  • I just wanted to provide a final update. I did as you suggested and changed the primary key back to the record ID. Your QB Action suggestion worked without the need for a refresh so all goals were accomplished! I really appreciate all the time and effort you spent to help get me to this conclusion. I've learned a lot in the process.