Forum Discussion

DavidHalter2's avatar
DavidHalter2
Qrew Member
5 years ago

How to: Edit and automation and have it run again on all applicable records?

Hi:

So, I've written automations (all variations on one theme) that transform input data to a secondary table that will contain the output data and formats we want in the end.  But, I've realized that I need to edit the automation now because its not acting the way I want it to. It's copying over some blank values which won't  be useful and will just be confusing.  My thought was: remove all the secondary table records, make a field on the input data table that I can change simultaneously and Voila, the automation will run again.  I used Mark Shnier's focus date range parent-child table method to make a single field change simultaneously throughout the table and no luck. No automation fired.  Is there another strategy I should use?

Hmm, I guess since I'm still in app building mode I would be able to export the records the automation will run on, clear all the records, and re-import the records. That should fire the automations again. But that's probably not a good strategy in a live app environment.

Thanks
Dave



------------------------------
Dave Halter
------------------------------
  • Can you take a step back from the technical questions and explain the business process you are trying to do?  There may be a way better way than Automations.  Are you trying to have a process to routinely receive raw data via a manual import, transform and clean it up, and then push to your real data table?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • DavidHalter2's avatar
      DavidHalter2
      Qrew Member
      Thanks for the interest Mark.  I can try!

      We are looking at tracking activities that occur in a training program where there is also heirarchy. That is: staff / senior trainee / junior trainee.  Sometimes staff trains two juniors. Sometimes a senior trains a junior with the help of the staff. Sometimes a senior does the activity with the help of the junior and no staff.  And other combinations. Thus, you might have records:
      Primary actor Secondary Actor Tertiary Actor Grade Activity details (date, label, etc. multiple col)
      senior staff junior 2 activty 1
      staff senior 1 activity 2
      senior junior staff 4 activity 3
      junior senior staff 3 activty 4

      Each person may have a slightly different role in the activity even when the Actor position is the same.  Thus activity 1 the senior needed more help  but in activity 3 the senior needed very little help and in activity 4 they were teaching while in activity 2 they were observing the staff.  This data entry model makes a lot of sense when entering because that is how the activity proceeds and how it is already commonly recorded.  IE, entering the data in the same way I want the eventual report is problematic because the people just don't think that way. My automations solved that problem to get a report of the trainees (not the activities).  I end up wanting a list of activities for each person.  So the list above needs to be reported like this:
       
      activity person job category in words grade (may or may not be same as reported grade)
      activity 1 senior primary needs lots of help 2
      activity 2 senior secondary observing 1
      activity 3 senior primary needed very little help 4
      activity 4 senior secondary taught the junior 4
      activity 1 staff secondary teacher 6
      activty 2 staff primary teacher 6
      activity 3 staff secondary teacher 6
      activity 4 staff tertiary teacher 6
      activity 1 junior tertiary observing 1
      activity 3 junior secondary observing 1
      activity 4 junior primary needed very little help 3


      The automations I have set up do this nicely based on rules which may or may not be obvious above, but the problem became today that I had it set up inappropriately and it passed the blanks for tertiary for activity 2.  And it did it over and over and over (500+ records in my test database).  So, that was a problem.  What I really wanted was to fire the automation over and just get it reset.  Probably one thing I could do is set up a time-based triggers and run an overnight automation basically run the same automations but getting it right could be tiresome if I mess it up a couple times and have to wait until every night to let it run to see if I set it up correctly.  In the long-term, I'm thinking about what will happen if the reporting requirements change and then I've got a very useful set of database records with all the correct information but all the wrong answers, so to speak.

      So, 2 questions remain, then.  Is there a better way to get the desired result?  Second, if not, is there a better way to get the automations to fire when I want them to particularly if I'm testing or else if the reporting requirements change, which they might.

      Thanks
      Dave

      ------------------------------
      Dave Halter
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Unfortunately, there's not a way to convert a scheduled automation into an automation that can be run on the trigger. 

         But if you were willing to rebuild your automation, you can make the automation which triggers on the change of a control record somewhere. This could be a single record in a single table that exist on it for the purpose of triggering the automation.    So you can trigger manually anytime you like. 

         Then you set up a scheduled automation whose only job is to update a date time field on that control record to be the current date and time and that would then trigger the overnight automation.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------
    • DavidHalter2's avatar
      DavidHalter2
      Qrew Member
      Oh, so no, to your direct question.  This would all be data coming direct from the app itself.

      ------------------------------
      Dave Halter
      ------------------------------