laguna92651 Posted June 30, 2016 Posted June 30, 2016 I have a found set of accounts, for each account I am creating a set of records starting at the current date with each additional child record's date field incrementing by 8 days. The two loops are working fine. Date Records 7/1/2016 7/9/2016 7/17/2016 7/25/2016 8/2/2016 etc. I would like to stagger the start dates into 4 groups 1st Account's record sequence starts today. 2nd Account'srecord sequence starts 7 days later. 3rd Account'srecord sequence starts 14 days later. 4th Account'srecord sequence starts 28 days later. 5th Account'srecord sequence starts today. 6th Account'srecord sequence starts 7 days later. 7th Account'srecord sequence starts 14 days later. 8th Account'srecord sequence starts 28 days later. 9th Account'srecord sequence starts today. 10th Account'srecord sequence starts 7 days later. 11th Account'srecord sequence starts 14 days later. 12th Account'srecord sequence starts 28 days later. ... and so on. New Account 1 Date Records (the same) 7/1/2016 7/9/2016 7/17/2016 7/25/2016 8/2/2016 etc. New Account 2 Date Records (starts 7 days later) 7/8/2016 7/16/2016 7/24/2016 8/1/2016 8/9/2016 etc. What would be the structure to set the date field to the correct staggered date for the account records as I loop through the account found set.
comment Posted June 30, 2016 Posted June 30, 2016 Well, you could use: Mod ( Get ( RecordNumber ) - 1 ; 4 ) * 7 (while in the Accounts table) to determine the initial offset. That is assuming that after 14 comes 21, not 28 as you have written. However, I would urge you to reconsider your overall strategy. What is the purpose of creating all these records? Surely there must be a simpler way to accomplish whatever this is supposed to accomplish?
laguna92651 Posted June 30, 2016 Author Posted June 30, 2016 I am creating a yearly contact schedule for each account, lets say visit each account every 3 weeks. So all visits don't happen on the same weeks, I'm staggering the start week for each visit sequence, so account 1 starts this week, account 2 next week, account 3 in 3 weeks, account 4 in 4 weeks, then start over, account 5 this week. I'm open to other ways of doing it.
comment Posted June 30, 2016 Posted June 30, 2016 Well, if you're going to actually use those visit records by entering some data into them during the actual visit, then it makes sense. Personally, I prefer not to create a record until I have some real data to enter into it, but it can work either way.
Recommended Posts
This topic is 3068 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now