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.

Inifinte Parameters?

Featured Replies

Hi All,

Is is possible to have endless parameters in a custom function (like there are in the Case function, for example)?

Thoughts?

Thanks!

Yes...

One multi-values parameter and a CF that evaluates each values.

Like:

SumCF ( par1 ; par2 ; par3 ; ... ; parN )

Evaluate ( Substitute ( par ; ";" ; "+" ) )

Can you give us an example of the CF you want to do ?

  • Author

well as a really simple example, a custom function called Add that adds as many values as you want from unlimited fields.

(The function I actually want to create is really complicated, and I'm not sure I can explain it very well...)

I'm not sure what you meant by the multi-value parameter- where do you designate multi-value status?

Thanks!

Sara

Substitute() is often the key to this kind of challenges.

More details on your need would help us, since Sum() already does exactly what you proposed as an example.

You can still have a look at this file, which includes a custom function SubstituteManyWithCalculation

http://www.bh-a.com/downloads_1.1.html#HilightSearchTerms

It could actually be done (I would even recommend it) without a custom function, but if you have many of these things to do, it's still a time saver.

Hi Sara,

You could pass a paramater like:

Actual CF: MyCF( var )

CF Call: MyCF( List( field1 ; field2 ; field3 ; field4 ; field5; ... ; fieldn ) )

Then you can get the number of paramaters using ValueCount(var) and you can interact with a particular parameter using GetValue( var ; n ) where n is the parameter you want to retrieve.

HTH

Ok, my example was exactly like your example !

Say that we define a CF like this:

------------

/*

Add ( par ) Custom Function

*/

Evaluate ( Substitute ( par ; ";" ; "+" ) )

------------

Now, if the calculation field is:

Add ( "1;7;5" )

the result will be: 13

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.