Automation - Add Record with formula

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Acknowledged
I want to run an automation to add a bunch of records to a table once a day, all of which will have in the field Batch Ref: *Tomorrow's Date* & "A bunch of other text". The field type is text, and cannot be formula as this field is the key field.

I tried the below and tested the automation and just ended up with literally the code written below populating the field. Does anyone know how to achieve what I'm trying?



Photo of Max Allen

Max Allen

  • 302 Points 250 badge 2x thumb

Posted 8 months ago

  • 0
  • 1
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 3,080 Points 3k badge 2x thumb
Automations, in my experience so far, are very finicky.  Try using a formula-date field to automatically calculate your "tomorrow" date; and use that when pushing a date field into a field in a table.  

I have had to rebuild automations which mysteriously do not populate the data I required, after making multiple "updates" to an automation - so one good test is to figure out the entire automation and rebuild it and test with the new one (then do all the naming and commenting after you ensure it works).

A screenshot of your automation setup would also be helpful here.
Photo of Matt Saforrian

Matt Saforrian, Employee

  • 452 Points 250 badge 2x thumb
Hi QuickBasePros_IDS,

The issue you encountered with automations not populating data was a bug and has been resolved. You shouldn't have to rebuild automations anymore.

If you encounter this issue in the future, just open your automation and then save it. That should resolve the error.

Best,

-Matt
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 3,080 Points 3k badge 2x thumb
Matt - good to hear!!!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,670 Points 50k badge 2x thumb
Max,
you cannot just type a formula into the automation box.  You need to make a formula field and then write the value of that field into a record.
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 11,020 Points 10k badge 2x thumb
Hi Max,

Currently the Automation builder doesn't have the ability to use formulas that have been entered into the Automation. Instead you would need a formula field that provides the values you are trying to pass along as the previous posters suggested. This way the Automation would have a value to pass along, as you experienced a formula put into the Automation builder will pass along as text.
(Edited)
Photo of QuickBase Girl

QuickBase Girl

  • 598 Points 500 badge 2x thumb
Is there something to type into an automation field that will leave a required formula field alone? 

Here is the problem. I have a field in the table that is being populated that is a formula, unique, AND must be filled. It populates itself with the data that comes in to that table. (cipher of text fields)

However, because it must be filled in, it shows up on the Automation as Required to add record. This does not jive, so the Automation is failing and nothing is getting imported. 

I have another unique identifier field in this table so the formula one is not really needed, as far as adding information goes, but this formula field is a key field for another table, so it has to be there. (Yes, this is a complicated app)

SO my question is, is there anything I can put in that Automation field so that it just ignores data trying to be added, or anything like that. I am kinda losing it over here about it.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,670 Points 50k badge 2x thumb
Do you have a way to calculate the Cipher field on the trigger record?  If so then it will be an available field to to populate that field.  Else you would need to have the field not be required, but then trigger another automation to populate the field when the record is first created. 
Photo of QuickBase Girl

QuickBase Girl

  • 598 Points 500 badge 2x thumb
The problem is that the cypher field is the key field.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,670 Points 50k badge 2x thumb
Ah, so is the issue that you have the Key field of the table being a formula field which you accomplished using the hand typed API_SetKeyField&Fid=xx and the issue is that the Automation does not play nicely with that semi unpublished capability?