Skip 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.

Function with a loop, please help

Featured Replies

Hi

 

im still a bit of a beginner with filemaker

 

i have been trying to figure this out but need a little help. 

 

I have this function

 

If
(GetAsDate ( Date1) - GetAsDate (  Date2 )  <  0 ;
 Date1 + 28 ;
 Date1
)

 

 

What i need is to turn it in to a loop

 

so that 28 is added to Date1 until Date1 is higher than Date2

 

I have tries and testes let function and loop,

 

if any one could help 

 

Many Thanks

 

Meir

 

 

1. Filemaker calculations do not loop.

 

2. Since you have the Advanced version, you can write a custom function. A custom function can be recursive (i.e. it can call itself in a loop).

 

3. Looping is not required to solve the current problem. Try =

Let ( [
diff = Date2 - Date1 ;
periods = Ceiling ( diff / 28  )
] ;
Date1 + Case ( diff > 0 ; 28 * periods )
)

or, if you prefer =

Date1 + Max ( 28 * Ceiling ( ( Date2 - Date1 )  / 28  ) ; 0 )
  • Author

Thank you so much

 

really appreciate it

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.