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.

Featured Replies

Novice question here.

I'm trying to query a set of records from a database based on four criteria.

1). The complete flag is checked.

2). The ID is relevant to the query.

3). The Publish Date is today or has past.

4). The Publish time has also past on the Publish Date.

The first two are easy - via a nested FMP-if:.and. statement but I cannot seem to get a response for the others when I use CurrentDate and CurrentTime.

Any ideas?

Many thanks.

Gary

Do it in the databse rather than in CDML: make an unstored calculation field that does the work. Say we call the field PDcheck...

If[PublishDate > Status[CurrentDate], "0", "1"]

...then you've just gotta use the CDML in your formay file...

[FMP-If: PDcheck.eq.1][/FMP-If]

Ditto for current time... do the calculation in the database and use the calc field in the CDML format file.

The astute FMP function-o-philes would have realised by now that the function could be simplified to...

Not (PublishDate > Status[CurrentDate])

I dunno whether this would be a faster calculation, it might be because (technically) it is simpler.

  • Author

Thanks Vaughan. I've also just discovered that using the -op variable to state that the date has to be equal to and less than today followed by date=// also works. Is there a greater performance overhead doing it this way via a CDML URL?

[This message has been edited by gary jones (edited November 03, 2000).]

Create an account or sign in to comment

Important Information

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

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.