MoveItem ( myList ; n1 ; n2 )
Moves item at position n1 to position after orignal n2
Average rating: 4.5 (34 votes) Log in to vote
Bruce Robertson - Show more from this author |
MoveItem("1¶2¶3¶4¶5"; 3; 1)
Result: "1¶3¶2¶4¶5"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Moves item at position n1 to position after original n2. I'm using this in scripted drag and drop list re-ordering.
See example file here:
http://concise-design.com/downloads/dropdemo.zip
Comments
JJackson, Santa Rosa, CA Nov 13, 2013 |
||
Here is a fix for moving something to the front of a list: Change the line n2 < 1; myList; to read n2 = 0; V1 & "¶" & L1; n2 < 1; myList; Now, MoveItem("1¶2¶3¶4¶5"; 2; 0) Result: "2¶1¶3¶4¶5" A similar change could be made to move something to the end. Passing in -1 for n2? |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.