Ok, one of the worst subject lines ever, I know, but I'm not sure what to put there.
Anyhow, the controls I'm talking about are the ones you use in the MOSS managment web site (this one I'm sure isn't in WSS as it's part of the SSP) after you add a custom property. Those of you that have done this know that in order to move the new property all the way from the bottom to where you need it (in order to get your "Details" page to look as you intended) you click one of two arrows. It's one arrow for up and another for down, both have a snippet of Javascript attached to it.
I was getting fed up with having to click the up arrow 35 times in order to move my new property to the correct position so I thought I'd hack the Javascript snippet. It didn't do any good but I though I'd share my findings - albeit minor - with you.
This is the code (sanitized for publishing) for moving the property at position 43 to position 42: javascript ProcessProperty('ctl00$PlaceHolderMain$MgrProperty1_N_43','False','MoveUp','ctl00$PlaceHolderMain$MgrProperty1_U42')
To me it looked like I can replace "U42" with "U14" and have it jump from 43 to 14. No such luck.
The first variable, 'ctl00$PlaceHolderMain$MgrProperty1_N_43', indicates at which position the property you want to move exists. This means that we can't re-use the same link over and over again in order to move the property - it points to a position in the list and not a specific property.
I'm not sure about the second variable so feel free to fill me in if you know anything about it. The third one is pretty self-explanatory - it says "MoveDown" for the down snippet.
Now, the final variable is the most confusing one as one would assume that it tells the script where to move the property. Then again, why would there be a need for the "MoveUp" variable if you could tell the snippet to move between two positions? Huh, didn't think about that did you? Me neither, until just now. :)
So what it does is tell SharePoint where to put the focus when it reloads the page. As you move the property one step up it's logical to focus on the next position in the list. If I replace 42 with 14 all that happens is that the page reloads with focus on the property at position 14 in the list.
So, here's my tip to the SharePoint team at Microsoft; make the code snippet move from position A to position B and skip the direction altogether. This way I, the power user, can hijack it and tell it to move the property at position 42 to position 14 in one fell swoop.
Thoughts?