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.

How get a "multivalued field" from FM ?

Featured Replies

  • Newbies

Hello everybody !

My job is to get datas from an enormous FM database (bad organised ^^) and to show them on a simple website.

I'm getting easily those datas with commands like :)

$record->getField('FieldName');




My problem is, there is values I must get in FM wich are in a sort of array, "rubriques multivaluées" in french, "multivalued field" maybe in english ^^. 

I see a FM script that get the 2nd field like that : 


fieldName[2]

Of course I tried this in my "getField()" method, even fieldName[1], but that return nothing...

I can get the first value of this field but not others...

Thx for helping !

  • Author
  • Newbies

oh in fact, I can only do it with the new version of FM server... (i'm on 10 and it's on 11 or something like that...)

:)

  • 1 month later...

In the off chance you haven't figured this out yet (and for folks searching down the road), you need to set the second parameter of getField to the index of the repeating field. i.e.


 $record->getField('FieldName', 2);

To get the second repeating value from the field

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.