February 25, 200916 yr using a technique to sort portal items if i want to move an item up or down add an decimal to the sort order, like 2.5 will place item between 1 and 2. Then I run a script trigger after that to perform an operation that would re-serialize the sort order. Option A GTRR to the portal records, sort, go to the first then replace 1 increment by 1 then go back to original layout. (or use off screen window { haven't tested on windows may create window dancing } ) Option B Loop thru the portal resetting the sort number incrementing accordingly. Which would be cleaner and most efficient? thanx S
February 26, 200916 yr Author Thats how i have it setup now however, I think that returning to the original layout will require capturing current state (tab panels / portal row selected ) prior to executing the script so that you don't loose focus if you have nested tabs?!
February 26, 200916 yr Neither method is best. You don't want to update all the fields in the group. Just swap the two adjacent numbers like so: 1. A 2. B 3. C 4. D To move B down the list, set record B to 3, set record C to 2. 1. A 2. C 3. B 4. D
February 26, 200916 yr Author not exactly you need to resequenced all numbers after the change... Original Portal 1. a 2. b 3. c 4. d 5. e ~ 23. w 24. x 25. y 26. z MOVE ITEM x below c 1. a 2. b 3. c 4. x 5. d ~ 23. v 24. w 25. y 26. z
February 26, 200916 yr Ah, I see. You want to be able to move an item more than one place in a single operation. In which case I would probably opt for A. A freeze window will probably prevent the screen moving too.
February 26, 200916 yr An interesting question, as to which would be faster and smoother looking. An alternative idea, if you were never showing the numbers, would be to not renumber them, but just leave them as decimal numbers. You would never run out of decimals.
Create an account or sign in to comment