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.

custom function parameters-bug?

Featured Replies

I was having trouble with a custom function. Discovered that you can not pass a value from a repeated field to a custom function.

I had to set a non-repeated field value to the value I wanted to pass and then use it as the custom function parameter.

Is this a bug in FM? Seems you shouldn't have to go to through the extra step of 'set field' to use a custom function

This is due to the fact that the entire repeating field can be passed. I suspect some other operation would disassociate it.

So,

  CF( A[2] & ""; A[3] + 0 ),

depending on your data type.

Huh? AFAIK, if you reference a repeating field as a parameter, only the first repetition is passed. I don't know of any bug.

I didn't say there was a bug, just that the repeating fields are passed to the custom function as a field, not just the value.

Here's an example file, notice the MyValueRep() custom function, which pulls data from a repetition other than the first, showing the data for the other repetitions is available inside the custom function.

repeats.fp7.zip

Yes, I am aware of this perplexing duality of the parameter (my test file is nearly identical to yours). Still, that works only with repeating and aggregate functions (I think), so I didn't consider it relevant in the context of "can not pass a value from a repeated field to a custom function". If anything, it shows that on the contrary - you can pass several values from a repeating field to a custom function. I am still curious what led the OP to such sweeping conclusion.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.