Brian Dunning's FileMaker Custom Functions

ValueListFilter ( pList ; pString ; pDir ; pPos ; pType )

Checks any valuelist for the occurrence of pString.

  Average rating: 4.2 (30 votes) Log in to vote

Peter Schmidt   Peter Schmidt
-/-
-/-

Share on Facebook Share on Twitter

  Sample input:
pList = "ID_usr¶forID_01¶forID_02¶
forID_03¶UserName¶
UserRolleName¶UserPasswort¶
GUserName¶gUserPasswort¶
gUserRolleName¶"
  Sample output:
cfValueListFilter ( pList ; "g" ; 1 ; "" ; 1 ) = "gUserPasswort¶gUserRolleName¶"
cfValueListFilter ( pList ; "g" ; 1 ; "" ; 2 ) = "ID_usr¶forID_01¶forID_02¶forID_03¶UserName¶UserRolleName¶UserPasswort¶GUserName¶"
cfValueListFilter ( pList ; "Name" ; 2 ; "" ; 1 ) = "UserName¶UserRolleName¶GUserName¶gUserRolleName¶"
cfValueListFilter ( pList ; "Name" ; 2 ; "" ; 2 ) = "ID_usr¶forID_01¶forID_02¶forID_03¶UserPasswort¶gUserPasswort¶"
cfValueListFilter ( pList ; "ID" ; 3 ; 1 ; 1 ) = "ID_usr¶"
cfValueListFilter ( pList ; "ID" ; 3 ; 4 ; 1 ) = "forID_01¶forID_02¶forID_03¶"
cfValueListFilter ( pList ; "ID" ; 3 ; 4 ; 2 ) = "ID_usr¶UserName¶UserRolleName¶UserPasswort¶GUserName¶gUserPasswort¶gUserRolleName¶"

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

Checks any valuelist for the occurrence of pString and displays only the values, which contains (pType = 1) or not contains (pType = 2) pString. Checking occurs from left (pDir = 1), right (pDir = 2) or middle (pDir = 3) and it's case-sensitive.

 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: