May 4, 200520 yr 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].)
May 4, 200520 yr 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
May 4, 200520 yr 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