Forum Discussion

LijaKoch's avatar
LijaKoch
Qrew Trainee
7 years ago

QuickBase automation add a new record with conditions

I have a question when it comes to creating an automation that creates a new record.

I have a parent table called "Document Control".  There is a field under that table called "Next Update Date" that tells the user when they should be reviewing the document next.  

Under the Document Control table is a child relationship to Tasks.  Documents will have many tasks.  

I would like to create an automation when the "Next Update Date" is today's date, to add a new task record to that document.  (I do know to have the Related Document Control = document control record Id)

So for example, say the Next Update date is today's date, then I would like a task record to be created under the document control parent table.

The problem I think is, is because the task record does not exist, the task does not know if the Next Update Date is today/past due.  I also do not want to just add a task record as other Parent Tables have a child relationship to the tasks table.  For, example, the parent table Projects has many tasks.  I do not want tasks to be created randomly without a link to the parent nor do i want many tasks being created under the Projects table.  

Is there a way to do this better?
  • Hi Lija,

    It sounds like you need the automation to run on a schedule and add new tasks for any Documents where "Next Update" is equal to today.

    You should be able to accomplish this in one of two ways.

    The first is to create the task whenever the "Next Update" field is filled in. You can then keep track of that task via a relationship or with an automation. This might be the simplest solution.

    The second, is to use an upcoming feature (scheduled automations) to run a table import once a day. The table import would be setup so that it creates related Tasks for any Documents where the "Next Update" field is equal to "today".

    Scheduling for automations is coming in the next few weeks so keep your eyes peeled.

    Best,

    -Matt
  • Hi,

    Thank you so much for your response.  I think the only part I do not understand is how does the task table know to do this when the record does not exist. I created an automation under the tasks table that when a task is modified, deleted, added to then create a task child record under the document control table.  But because no task exists, how does the table know if the Next Update field (field in the document control table) is after today's date?

     I created a relationship between the documents table (parent) and the task table (child) and did a "look up" to the tasks table to look up the "Next Update" date field.  The problem I think is how does the task table know if the Next update field is if the record does not exist.  I created a formula field to be "1" if the Next Update Date is past today's date and 2 if it is not.  Because automation does not let you do a condition based on a date field, this was my best option.  So, I added the condition that if the Document - Next Update Date Trigger is = 1 to add the task record, but currently this is not working because I think the task record does not exist and does know know what the next update Date trigger field is.

    The reason I would like the task table to have the automation is because users edit and modify tasks more than they would be editing anything or any record from the document control table.