After automated add record, require user entered text

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered
Hi all,

I have created an audit log to track when utility poles are moved in and out of a work request outside of the original work request creation. The work request table is the parent table of the poles table. When a user changes the work request number on the pole form, a log is generated with the user, date created, pole number, old wr, new wr, and log notes.

The issue is that everything is automated except for the log notes. The user would then have to go to the log and enter in the log notes as to why the pole was either taken out or moved in after the original work request(wr) creation. 

So - after the log is generated, I want QuickBase to require the log notes to be filled out before proceeding, whether that be them being redirected to a simple form with a text box or redirected to the log record where the log notes are "required." Perhaps, the action or automation could happen when a WR# in a pole form is modified and reveals a hidden required text box that gets copied to the log notes upon log record creation.

Any suggestions?
Photo of Jordan McAlister

Jordan McAlister

  • 630 Points 500 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
Photo of Alex Wilkinson

Alex Wilkinson

  • 1,146 Points 1k badge 2x thumb
What you've described is a use-case that I really, really would like Quick Base to support: use an automation to both add a record (a log note in your case) and open it for editing. Your case, luckily, might be implemented in another way. I haven't tested it, but think it would work.

1. On the pole form, add a new field called "Reason" or something similar. In the form, display the field only in edit mode, and, in addition, use a form rule to show and require the field only when the work-request number is changed.

2. In the automation that creates the log record, copy the "reason" field into the new log record. I'm not sure from your description whether a "log note" is part of the pole form (maybe a text field that logs all entries) or a separate record (a child or the pole parent). Either way, an automation should handle it, either with an additional field-copy (for a text field that logs entries) or with an additional action (for a child record).
Photo of Jordan McAlister

Jordan McAlister

  • 630 Points 500 badge 2x thumb
Thanks for your reply! I'll give this a try and let you know how it goes!
Photo of Jordan McAlister

Jordan McAlister

  • 630 Points 500 badge 2x thumb
I am experiencing a form rule problem: In order to use the action, "Show" or "Require," I have to use the condition, "When a <field> is equal to <value or field>." If I have the condition, "When WR# is changed," it only gives me the option to either "abort the save" or "change specific field to <value>."

Any suggestions? - or am I doing something wrong?
Photo of Alex Wilkinson

Alex Wilkinson

  • 1,126 Points 1k badge 2x thumb
Sorry. Must original suggestion was less precise than it should have been. If you are still having a problem, try this for part 1:

On the pole form, add a new field called "Reason" or something similar. In the "help" bubble for this field, explain when it must be filled. In the form, display the field only in edit mode. Also add a form rule like this, which has the effect of making the "Reason" required:

When the record is saved
and all the following conditions are true:
  • MR# has been change
  • Reason is equal to ____ (i.e., it's blank)
Abort the save ... with the message "Please fill the Reason field to explain why the MR# was changed"

Photo of Evan Martinez

Evan Martinez, Community Manager

  • 11,406 Points 10k badge 2x thumb
When I need to do something similar and I want to trigger a Form Rule off of a value changing in a field I often create a log field, so in your instance something like WR# Historic that I can set up an Automation to say whenever a record is added or edited and that field changes update that WR# Historic with that new value. This way when you change it on the form you can compare it against the field that has the historic value to trigger the Form Rule. Then once it is saved it will update to the new value making it ready to be used again. It does mean adding another field and Automation but it can help you get that value in a place you can use it to compare in Form Rules and trigger off the requirement you need. 
Photo of Jordan McAlister

Jordan McAlister

  • 630 Points 500 badge 2x thumb
I see! I'll give that a try!