Forum Discussion

MichaelMahon's avatar
MichaelMahon
Qrew Trainee
4 years ago

Parse selected calendar days into individual records

How do I parse a block of calendar days selected in a calendar report into individual records. Example: If a user selects 14 days in a calendar a new record is created for each of those days totaling 14 days?

------------------------------
Michael MM
------------------------------

5 Replies

  • There are a few ways to do this. What is the maximum # days this needs to work for?  That will affect which choice would be best.​

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelMahon's avatar
      MichaelMahon
      Qrew Trainee
      Not more than 10 business days or 14 calendar days

      ------------------------------
      Michael Mahon
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        OK, np,

        We get to do this stupid simple brute force.  I assume that these records will be children if the parent Calendar Record. Look up the value of the [Last date of the range] down to the children.

        Make 14 new formula date fields to calculate the 14 dates dates from 0 days to 13 days ahead.  

        Then make an automation to fire when a calendar record is added, changed or deleted and either the start or end date range changed. 

        Step 1.  Delete all children of the parent calendar Record

        Step 2 through 16 is to create the  14 children.

        Step 17 is to delete all children which are older than the [Last date of the range]

        The reason for the first step to delete all its children is to handle if the date range is changed. 






        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------