Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Recursive Date List Function

Featured Replies

I have a project where I need to make a value list of dates based on start date and end date.  Once I have a value list I can then select a value position based on other criteria.

 

a date range on the record may be:  (start) 1/1/2014  to  4/15/2014 (end)

 

The list created would always be for the first day of each month for the duration of the date range:

 

1/1/2014

2/1/2014

3/1/2014

4/1/2014

 

I'd like this to occur as a calc or CF, I'd rather not script this to create a variable because there may be a few hundred needed to generate.

 

Thanks,

 

David

 

I would use a repeating calculation field for this =

Let ( [
start = Extend ( StartDate ) ;
d = Date ( Month ( start ) + Get ( CalculationRepetitionNumber ) - 1 ; 1 ; Year ( start ) )
] ;
Case ( d ≤ Extend ( EndDate ) ; d )
)

The advantage being that the result type is Date. The (minor) disadvantage is that you must pre-set the number of repetitions to the maximum expected duration in months.

 

Once you have this in place, create a self-join relationship matching on the record's unique id and define the value list to use the related values.

So you use the related values based on id to constrict the dates otherwise a regular value list would show dates for all records.  Is this correct, Comment?  


Never mind. I should just test it.  sorry to bother.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.