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.

Anyone have a PERMUTATIONS function?

Featured Replies

Basically, what I am looking for is a custom function that can take a value list and create every permutation of the items in the value list. Say I have a value list "cat;dog;mouse", I want to be able to feed the custom function that value list and get:

cat dog mouse

cat mouse dog

dog cat mouse

dog mouse cat

mouse cat dog

mouse dog cat

The order of the permutations doesn't matter as long as all the permutations are returned. Also, the number of values in the list I feed it is variable. One time it may be three values as above, another time it may be four and so on.

Anybody help? I have been staring at my screen for hours. I am hoping this is easy for someone.

Let ([

a = ValueListItems ( flName; List Name ); /* get the items in your list */

b = PatternCount ( b ; "

  • Author

Thanks for the thoughts. I was hoping someone would have a recursive function that would eliminate the need for all that code. I am actually currently hard coding it, but it's not very flexible.

I don't understand what a recursive function is or what it does or means? Anyone?

A recursive function is a function that calls itself until a condition has been meet. Excelisys has a good pdf on this subject on their web site. http://www.excelisys.com

A recursive function recurs, i.e. loops until a condition is met. Somewhat similar to a looping script with Exit Loop If[]. In Developer7 you can write custom functions, and a custom function can call itself, thus being recursive.

Example:

Custom Function:

CountFromTo ( start ; end )

Returns a comma-separated list of integers starting from start and ending with end.

Case (

start <= end ;

start & ", " & CountFromTo ( start + 1 ; end )

)

  • 3 months later...

Hi,

attached my little contribution to your problem...

two custom functions: one for five characters and one for five fields.

permutazioni.zip

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.