Friday, October 29, 2010

jQuery Saves The Day Again!

This is just a quick post on what I needed to get and what I did to get it.

I was using SPServices today and I needed to know the view name for the view that I was on. I have a list that has several views and I wanted to know the name so that I could use it for the "getlistitems" webservice call. I know that ctx.view will get you the current view by guid, but I wanted the actual name.

The name of the view is actually on the page in the viewselector dropdown and this little piece of code gets the text of the current view

var viewname = $("td[id*='onetViewSelector']").text();

Now that is really neat huh?

Thursday, October 28, 2010

Was It Really Cool or Is It Just Me

So today was the day that I had to migrate data from an old system to a new system. I was tasked with converting an old Access database to Sharepoint. Since we only have WSS 3, it was going to a little harder to get it done and to do it right. I know that there may have been other options, but I will outline what I did and why I did it that way.

The choice was made that we would only need to convert the open items from the older system and that was my task. The main problem to overcome was that there were several changes in the new system. These included different fields and some functionality differences. But, that just made it challenging right?

Well, I love a challenge so I immediately hatched an evil plan (ha ha) to make it happen.

I first took the Access table and exported it to the Sharepoint site. This may seem strange, but it gave me a list in Sharepoint that I could work with. Then the rest was creating a custom aspx page with a code file and some object model code to loop through the items that came from Access and add them to the new custom list. I had to massage the data and ensure the old data matched the fields in the new custom list. The code was actually not too difficult and worked great for this and I can use this same approach for any future migrations. Was that really cool?

Any questions or requests, please let me know!

Sunday, October 24, 2010

It Has Been Way Too Long!

I have been quite horrible in keeping up with this blog! I am trying my best to change that! So I have taken some steps to try to make it easier for me to build a useful blog that others might find interesting. My Sharepoint knowledge is continuing to grow and I would love to share that with you! I am hoping that I can finish some of my older thoughts in some of the previous posts, but most of them are no longer on my plate as I have had to abandon them for time considerations. I think that I will be focusing on the printing article later and will mostly talk about a few things that I particularly enjoy.

My work environment does not allow me to use Sharepoint Designer on the production network, and we are still running WSS 3 only. All of my development is on a stand alone machine and most of what we do has to be created as .WSP solutions. However, I like to consider myself a rogue and sometimes I must challenge myself to find a way to make things work that may seem unorthodox to most. But as they say, there is more than one way to skin a cat! (Figuratively Speaking as I have five cats!) So within the next few days, I will be blogging about the Edit Control Block and how it can be customized. Along the way, I will be mixing javascript, jQuery (with SPServices), and .Net of the c# flavor to create an ECB you could write home about (Well, maybe not but..) So there it is and I will be blogging a lot more often! This time I mean it!