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.

Setting Repeating Field Elements

Featured Replies

FileMaker Developer 7. Normally I use my SetCell custom function to create a vector or matrix of cells with data. However, I'm in a situation where I must use a repeating field for purposes of screen layout and alignment. And no, a portal won't work here.

I can use a script to populate the repeating field one element of a time--there appears to be no way to increment the element index and loop. Is there? Also: is there a way to clear the repetitions all at once (at the beginning) without having to step through each element?

I have formatted the repeating field to have scroll bars--but these won't display! I can see the first 27 repetitions on the screen (the maximum which will fit on my layout) but I cannot see the remainder. What's up with this?

there appears to be no way to increment the element index and loop. Is there?

In version 7? I think you'll need to use a global field as a counter, e.g.:

Set Field [ gCounter ; gCounter + 1 ]

Set Field [ RepeatingField[gCounter] ; ... ]

...

I have formatted the repeating field to have scroll bars--but these won't display!

You can scroll the contents of a cell - not the array.

I must use a repeating field

Doesn't look very promising, I must say.

  • Author

I don't think later versions of FileMaker will help. I cannot use a global field for this, either. Therefore, I guess I will be using a text field with my SetCell custom function. I do think that FileMaker needs to have a whole set of repeating field (or array) functions.

Later versions have script variables - but that's mostly just an added convenience compared to using global fields. I don't see why you couldn't use a global field as the counter for a looping script - but I don't really know much about what you're trying to do either.

  • Author

Each record has to have its own set of matrix data (the size will vary). I used the SetCell custom function for this project and got the correct mathematical results, but the columns are a bit misaligned as I predicted they would be. I will have to see if I can format the elements of the array in such a way that they all line up; maybe Trim will work.

Each record has to have its own set of matrix data (the size will vary).

Hi Transpower,

This is why related records are usually used.

Newer versions of FileMaker have many new tools such as List(), GetNthRecord(), GetValue(). As for alignment, it might also help to use a non-proportional font. :^)

or tabs.

LOL, indeed. :laugh2:

There are so many new tools since vs. 7 I could not even remember them all ... seems everything is new just about. They make our lives much easier. Conditional formatting and merge variables alone would be worth the move.

  • Author

Hi LaRetta: Yes, I know all about related records, but it's simply not the right approach here (although it usually works for most situations). I have SetCell populating a text field with the correct columns of numbers but some of the values are misaligned. Even though I use the Round function to five places some of the values come out to four places, which then causes the misalignment! Trim doesn't help. The data are numbers, so I don't think a non-proportional font will help, although that's a great idea for other situations. Ditto for tabs. Is there anyway I can force FileMaker to keep the number of digits I tell it in Round? I suppose I could try to pad a zero at the end....

I'm going to be upgrading to Windows 7 Pro 64 from XP in the next month, and I will--finally--be upgrading to a newer version of FileMaker, probably 9.

The data are numbers, so I don't think a non-proportional font will help, although that's a great idea for other situations. Ditto for tabs.

No, not "ditto for tabs". Tabs can be set to align on the decimal point.

Is there anyway I can force FileMaker to keep the number of digits I tell it in Round?

Round() does not produce trailing zeros - that is a text operation.

Not sure why tabs will not work. I have created many columns in text fields and used tab characters and then format the field to align on the decimal or right-align.

I still feel like we are attempting to assist when blindfolded. You can pad numbers to two decimal. But without knowing what you have, how can we suggest how to fix it?

  • Author

OK, I found a custom FileMaker function, Fixed_DecimalDigits, from Brian Dunning's site, and changed the European "," to "." in it. Now the columns line up fine. Thanks, Comment and LaRetta, for trying to assist an old-timer. I'm happy to see that you're both still here helping people.

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.