Discussions

Expand all | Collapse all

Parse selected calendar days into individual records

  • 1.  Parse selected calendar days into individual records

    Posted 09-18-2020 14:48
    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
    ------------------------------


  • 2.  RE: Parse selected calendar days into individual records

    Posted 09-18-2020 16:22
    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
    ------------------------------



  • 3.  RE: Parse selected calendar days into individual records

    Posted 09-18-2020 21:42
    Not more than 10 business days or 14 calendar days

    ------------------------------
    Michael Mahon
    ------------------------------



  • 4.  RE: Parse selected calendar days into individual records

    Posted 09-18-2020 23:02
    Edited by Mark Shnier (YQC) 09-19-2020 07:41
    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
    ------------------------------



  • 5.  RE: Parse selected calendar days into individual records

    Posted 28 days ago
    My apologies for the delayed response and follow up. 

    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 (IN THE PARENT? ) to calculate (WOULD THIS BE A DURATION FORMULA?? see below) the 14 dates dates from 0 days to 13 days ahead.  
    Todays([Field 13]-[Field 0]) 
    Todays([Field 13]-[Field 1]) 
    Todays([Field 13]-[Field 2]) 
    Todays([Field 13]-[Field 3]) 

    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. 






    ------------------------------
    Michael Mahon
    ------------------------------



  • 6.  RE: Parse selected calendar days into individual records

    Posted 28 days ago
    These will be formula date fields.

    an example of one would be

    [Start Date] + Days(0)

    Then next one would be

    [Start Date]+ Days(1)


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