Skip to main content
Question

Generate a record for each day in the month with a pipeline

  • September 26, 2022
  • 0 replies
  • 167 views

Forum|alt.badge.img+8
I need to generate a record for each day in the month for the next month.   (there are several child tables that will be associate with each day so I need the base days for the month).  I have a miscellaneous table that has the first and last day on the next month, but using a search step performs one iteration.  I thought about incrementing and then doing an on event step.  I have not been able to figure out a way to make a pipeline iterate through to create the records.  Any suggestions would be appreciated.

------------------------------
Julie Meeker
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
Here's a stupid simple approach for those who are not into fancy Jinja looping syntax.
Make a helper table with 31 records in it. Number the records in a field called [Day #] from 1 to 31.

Make a formula field to calculate the date of the current month.  Call it [Date]. 

Today() + Days([day #]-1) 

Make a Checkbox field called [Day is in current month?]

Month(Today()) = Month([Date])

Then have a pipeline run every month to search that table every month for where the 
[Day is in current month?] is yes and then FOR EACH Loop to create a record in the target table. 


​​​

------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------