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.

Scripting with repeating fields (need arrays!)

Featured Replies

  • Newbies

Hello,

I am relatively new to FM, though not programming. I am building an extensive app under FMP7 to run my business. Though FMP7 looked good at first, I am starting to uncover major deficiencies...

Foremost, it seems that you cannot script repeating fields. That is, you cannot programmatically set the index. As a result, there is no easy way to have an array.. This is absurd, IMHO.

I'm sure others have needed arrays in the past. What is the recommended technique to obtain this kind of functionality? Does anyone have example scripts that I might look at?

Any help would be greatly appreciated.

(The specific need is to go through a set of many records of calendar events and, for a specific date range, build arrays that store for each date the total number of a certain kind of event. Exmp: for July 1st-10th, I need to build an array like TotalReservations[10].)

What is the recommended technique to obtain this kind of functionality?

Relations!!! - this is all newbees initial question. Today has Mike (Ender) uploaded an extremely healthy template to show the Filemaker way of handling appointments/bookings:

http://www.fmforums.com/threads/download.php?Number=158337

...arrays is where C++ and C and other lowlevel genuine programmers tools roam.

--sd

Filemaker is sadly lacking in the arrays area. Repeating fields are a poor substitute. You can refer to a repeating field by index when you retrieve data by Get Repetition ( repField ; repetition ), or the shorter repField[n], but not while setting the field. This is, BTW, true for any field - specifying which field to set by calculation is probably the most requested feature ever.

For your specific problem, you should define a relationship where date = date AND eventType = eventType, then use a calculation of Count ( relationship::eventID ).

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.