Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3068 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

  1. 7/1/2016
  2. 7/9/2016
  3. 7/17/2016
  4. 7/25/2016
  5. 8/2/2016
  6. etc.

I would like to stagger the start dates into 4 groups

  1. 1st Account's record sequence starts today.
  2. 2nd Account'srecord sequence starts 7 days later.
  3. 3rd Account'srecord sequence starts 14 days later.
  4. 4th Account'srecord sequence starts 28 days later.
  5. 5th Account'srecord sequence starts today.
  6. 6th Account'srecord sequence starts 7 days later.
  7. 7th Account'srecord sequence starts 14 days later.
  8. 8th Account'srecord sequence starts 28 days later.
  9. 9th Account'srecord sequence starts today.
  10. 10th Account'srecord sequence starts 7 days later.
  11. 11th Account'srecord sequence starts 14 days later.
  12. 12th Account'srecord sequence starts 28 days later.
  13. ... and so on.

New Account 1 Date Records (the same)

  1. 7/1/2016
  2. 7/9/2016
  3. 7/17/2016
  4. 7/25/2016
  5. 8/2/2016
  6. etc.

New Account 2 Date Records (starts 7 days later)

  1. 7/8/2016
  2. 7/16/2016
  3. 7/24/2016
  4. 8/1/2016
  5. 8/9/2016
  6. 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.

Posted

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?

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.