Brian Dunning's FileMaker Custom Functions

RemoveValuesFromList ( ValueList ; RemoveCount )

Remove a number of values from the value list. Useful for batch process of a long value list.

  Be the first to rate this function Log in to vote

Philip Wang   Philip Wang - Show more from this author
106th Street Wheel and Tire
http://www.106sttire.com

Share on Facebook Share on Twitter

  Sample input:
RemoveValuesFromList ("1¶2¶3¶4¶5¶6¶7¶8¶9¶10"; 5 )
  Sample output:
"6¶7¶8¶9¶10"

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

I use this function a lot to process the long results returned by a SQL query. It's not very intuitive to use a counter to do the getvalue(), but it's much easier in program to just get the few values from the top, then remove the top few values, then do the same to the next few values until the list is empty.
So this is a very simple function, but I use it so much that I like to share it.

This function might get into trouble if your list contains "char(13)char(10)" at the end of each line, so I suggest you to substitute all "char(13)char(10)" to just "char(13)" before running this. This should be a common practice in handling a list returned by SQL query.

 

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 16 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: