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.

Open to record with todays date.

Featured Replies

In my file, I have a date field, with one record for each date, going out for the next 60 days.  There's a script that creates new records once the last one is less than 60 days old, but the existing records go back for one year.  I also added a field called todays date, and when the file is opened, the current date gets entered there, and yes, it's a global field.

What I want to do is when I open FM, have it go to the record where todays date is the same as the date field.  In my opening script, there is the option to go to the record based on a calculation, but nothing seems to work.  I added another calculation field that if the date is the same as todays date, then it gets that record number, otherwise it's a zero, though I did change it to be an empty field.  And that field is getting the correct record number on the correct field, and as I understand it, that should then tell FM to go to that record number.  But it's always opening to the first record.

47 minutes ago, Tpaairman said:

have it go to the record where todays date is the same as the date field.

There are a number of ways you could accomplish this. Which is best for you depends on what else you want to happen - for example, what other records you want to have in your found set. And also, how much resources you want to expend on this.

The simplest way is of course to find the record. All you need for this is a script (or a single-step button).

Another option is to start by showing all records, then calculate which record to go to by subtracting today's date from the date of the very first record (which could be hard-coded in the script, or retrieved from the first record every time the script is run). Again, no other resources other than the script are required for this.

Yet another way would be to define a relationship matching an unstored calculation field returning the current date to the date field, and use Go to Related Record script step to get there. (There is more to discuss here regarding the surrounding found set.)


As for your attempt: IIUC, your calculation field returns the wanted number only "if the date is the same as todays date" - so you have access to that number only if you happen to already be on that record.

 

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.