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.

array in a Fm script

Featured Replies

Is there anybody know how to code/define/create an array (A1, A2, A3...)(or

even 2 dimension array A11, A12, A13...) in a loop of a FM script ? Thanx

Hi Georges

Arrays are not supported in FMP. What are you trying to do exactly? Tell us more if you want us to help you.

Serge

  • Author

Hi Serge: Thanx for reply. I've a group of same character (text) field that

I like to be able to code in a loop, ie. A1,A2,A3...A50, instead fo code

individually, one by one, ie "set field (A1, "X"), "set field (A2, "Y")...etc)

If you said FM doesn't supportarray in the scrip, then I guess I've no choose

to specify the array individually, right ? or there is other way to do it?

George

You can use repeating fields to implement arrays. These fields are not recommended for holding data that you may eventually want to search/sort/index etc., but can be useful in scripts. There are a lot of limitations though. While you can retrieve the nth element using the GetRepetition() function, there is no corresponding SetRepetition() function.

Some users implement their own arrays using regular or global text fields, using some character like

Hi George,

Yes, you can create arrays, I think - if arrays are simply 'multiple field data within one field.' Take a look at the first two of Ray's demos in the section on Dealing with Data and Arrays. If you can expand them you should be able to create them, right? After all, it would be simply inserting a pipe or other character between each 'content' wouldn't it?

Something like placing all fields (to be array'd) on a layout:

Go to Field [First field in tab order] ... this is important

Set Field [gGlobalTxt, Status(CurrentFieldContents]

Loop

Go To Field [Next]

Exit Loop If [status(CurrentFieldName), FirstField]

Set Field [gGlobalTxt, gGlobalTxt &

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.