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.

Apply Function to List

Featured Replies

I am interested in creating a custom function that would allow a user to apply a function to every value in a list.   It would look something like this:

 

applyFunction2List ( myList ; "function" )

... where 'myList' is a text field with return-delimited values, and "function" is a text expression of a user-specfied function. 

 

For example, applyFunction2List ("1¶2¶3" ; "[value] * 2" )

would return: "2¶4¶6"

 

I've tried working and modifying CustomFunction() and SubstituteManyWithCalclation(), without much success, but I admit I'm baffled by recursive functions. 

 

Any tips would be appreciated. 

Solved by jbante

Go to solution
  • Solution

I've written some functions that do this, ForEach and ForEach (non-recursive). You can reference these while writing your own, or just use mine. If you find anything I can improve, or want some clarification, please let me know.

  • Author

Amazing.  Exactly what I was looking for, and beautifully documented.  Thank you very much for sharing this.

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.