Dynamic Form Rule - Adding Record in Related Sub Table

  • 0
  • 1
  • Question
  • Updated 1 month ago
  • Answered
Hi:

I have a master table for Work Orders.  When a work order is complete, and an invoice is generated, I want to create an entry in a related receivables table [Date Invoiced].

What would be the best way to accomplish?

Thank you,

Dirk
Photo of Dirk Ruana

Dirk Ruana

  • 912 Points 500 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Photo of Xavier Fan

Xavier Fan, Champion

  • 930 Points 500 badge 2x thumb
I would suggest using Automations:

Online Hlep for Automations
https://help.quickbase.com/user-assistance/about_quick_base_automations.html

For the trigger, you would want "when data changes".

You can specify the fields that changed, and the filter condition for the trigger to fire - such as:
[Status] = "Complete] for the Work Order
AND
[# of Invoices] > 0

Then the action would be something like:

- Add a record in the Receivables table
- with [Date Invoiced] = [Date of Last Invoice]  (or something similar)



Photo of Xavier Fan

Xavier Fan, Champion

  • 930 Points 500 badge 2x thumb
Great to hear! =)
Photo of Dirk Ruana

Dirk Ruana

  • 912 Points 500 badge 2x thumb
One last question:

Can you sort of do the reverse?

If the Related Procurement Table has a zero value for an item purchased, can you select [Do not invoice] checkbox on [Parent Work] Order Table?
Photo of Xavier Fan

Xavier Fan, Champion

  • 930 Points 500 badge 2x thumb
Yes - as long as there is a valid Triggering condition, and trigger record knows the reference field for the parent work Order.

So for example - if you add / modify an Procurement Line Item record, with a [Value] = 0, then as long as you have the reference field back up to the Parent Work Order record, you can do the same thing.

i.e. Have an automation check the [Do Not Invoice] checkbox on the parent Work Order.
Photo of Dirk Ruana

Dirk Ruana

  • 912 Points 500 badge 2x thumb
Hi Xavier

Hmmmm took me a while, but I think I have it working.

Seems like I need to do a screen refresh to see check mark.  Could one modify to auto refresh as part of Automation?

Dirk
Photo of Xavier Fan

Xavier Fan, Champion

  • 930 Points 500 badge 2x thumb
At this time - "auto refresh" is not available as an action for Automations.

That would be a great feature - though I can see how it might be tricky to implement. 

For example - the Automation might be changing values in multiple records, in different tables.  How would it know which record you're viewing on your browser (vs. that of other users) to do the refresh, etc.