Brian Dunning's FileMaker Custom Functions

SwitchList ( ListA ; ListB ; CaseSensitive )

To add or remove several values in a list

  Average rating: 4.4 (44 votes) Log in to vote

Agnes Barouh   Agnes Barouh
Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html

Share on Facebook Share on Twitter

  Sample input:
1/---------------
SwitchList ( "ID_100¶ID_300¶ID_152¶ID_125" ; “ID_250¶ID_300¶ID_125” ; "" or 0 )

2/--------------- With Case Sensitive
SwitchList ( "James¶Alex¶Max¶max¶Anne" ; “max¶James¶Ugo¶Fabrice” ; 1 )
  Sample output:
1/---------------
"ID_100¶ID_152¶ID_250"
[ add ID_250, remove ID_300 & ID_125]

2/--------------- With Case Sensitive
"Alex¶Max¶Anne¶Ugo¶Fabrice”
[ add Ugo & Fabrice, remove max & James ]

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

To add or remove several values in a list

Be careful, the listB to does not contain duplicate data, only unique data

Not recursive, requires CustomList ( start ; End ; Function )
http://www.briandunning.com/cf/868

CaseSensitive [ Boolean ] : empty or 0 or 1


//---------------------------------- Example

SwitchList ( "ID_100¶ID_300¶ID_152¶ID_125" ; “ID_250¶ID_300¶ID_125” ; "" or 0 )
Result > "ID_100¶ID_152¶ID_250" [ add ID_250, remove ID_300 & ID_125]

CaseSensitive :
SwitchList ( "James¶Alex¶Max¶max¶Anne" ; “max¶James¶Ugo¶Fabrice” ; 1 )
Result > "Alex¶Max¶Anne¶Ugo¶Fabrice” [ add Ugo & Fabrice, remove max & James ]

Be careful, the listB to does not contain duplicate data, only unique data

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.