Eric’s adventures in Sharepoint, technology, and life.
Email icon Home icon
  • Looking for feedback, 3rd party add ins

    Posted on January 22nd, 2010 Eric No comments

    Looking for feedback about your one product you would want to include in a new Sharepoint deployment. I’ll keep this open as long as needed. Check out the Polls page at the top.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Running WebDAV on your WFEs

    Posted on January 20th, 2010 Eric No comments

    So I’m going to start this blog post with a rant about SSRS, make reports outputtable to Excel 2007 format!

    So with that said, we encountered a question poised to us from some of our users, “we have a report that is generated from SSRS that’s send to a file share. This has some KPI information we use in Sharepoint. It’s a manual process to get it converted and uploaded. Is there anything you can do to simplify this?”

    If the SSRS was configured in Sharepoint Integration Mode, our lives would have been much simpler, but it wasn’t, so this is what we did.

    AutoIT to the rescue. We created a script that will map 2 network drives, one to the network share where the files is sent from SSRS and the other to the Sharepoint document library where the file is to reside. Oh snap, can’t do a WebDAV connection to your Document Library in a SSL environment from the server! What to do?

    We scratched our heads for a while and this is what we did, configured an AAM to point from localhost to our Sharepoint address. In IIS we added an additional entry in the advanced web site identification screen for the Sharepoint website that uses SSL. Then if we opened a command prompt and did a net use Z: \\localhost\sites\site\doclib, a successful mapped drive is created. Score!

    After the drives are mapped with the AutoIT script, we excute a CMD file that copies the file from the file server to a temp directory, executes a VB script to convert the file to Excel 2007, copies the file to Sharepoint, then unmaps the drives and deletes the local files.

    If you’d like to see examples of the script, let me know. What a pain in the…

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Using authenticated RSS feed to Serve Public Data

    Posted on November 13th, 2009 Eric No comments

    I can only a little bit about this project now since we haven’t completed it but it’s really neat.

    Currently Departmental phone numbers are tracked on a Sharepoint list and then once a year, formatted and sent off to the printers for publication. Some people decided we should make this information publicly accessible in an online version. The problem is the Sharepoint data lies in an authenticated NTLM environment, how do we get it out there for the public?

    We, being Brian and I, created a simple AutoIT script that fetches the RSS feed of the list and saves it as an XML file. We added a service account to the Sharepoint site as a reader so it can access the information. The AutoIT runs as this user on a scheduled basis on a web server. With the XML file saved, it is passed through a ColdFusion script that parses the XML data to get the information we need and writes it into a SQL database. When users update a number in the list, the RSS feed sends this information along, the script gets it, processes it and dumps it into the database.

    It’s probably a round about method of doing it and I’m sure there’s a more elegant Object Model method for this. As a non-developer, I relied on Brian’s ColdFusion ability to handle the data conversion.

    We had a student programmer code an interface and it’s going to be rolled into our publicly searchable data soon.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Setting read only fields on an Editform.aspx page

    Posted on August 17th, 2009 Eric No comments

    So I was working on a proof of concept assignment that was relatively simple, but thinking about it there was an inherent security issue. The idea for this Sharepoint site is to have a list where someone would register for a research topic. They only get to choose 1 topic. I was going to go about it in a simple way since it’s a POC after all, so it’s just a 2 list solution with a workflow.

    All the research topics are entered on one list, and users will just add their name to the desired topic and save the item back to the list, where Ill do some workflow things and remove it from the list of available topics. Since users have edit rights, I removed the toolbar so they can’t delete it on my custom EditForm.aspx page. The big security hoop is them changing the actual content of the topic and or description.

    This is where my simple solution comes into play. The EditForm.aspx page renders code that looks like this for the Description field.

    
    

    Simply change the ControlMode from Edit to Display, and you have a Read Only field on your Edit page. No jQuery, Javascript, or additional CSS required.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Page viewer web part and UNC paths

    Posted on July 22nd, 2009 Eric No comments

    No it isn’t what you think, I’m still at ECU and not a Tar Heel. This post comes about from an internal project that I had done and now we are reworking. A bit of history, we are trying out using Sharepoint to serve as a file server for various software packages.

    Some concerns were raised about performance because these large files live in the content databases, which is valid I suppose. So I have been experimenting with trying to find ways to deliver the files from a different file server so the files stay outside the Sharepoint databases. Easy, I’ll use the page viewer web part and link to the file on the file server, problem solved. Or so I thought.

    IE is the only browser that will allow UNC connections in a page viewer web part and serve up the file. Firefox, Chrome, and Safari (horray for multi-platform environment) show the file path but don’t serve it. Searching for ideas on how to deliver the files, I turned to Tony and Brian, two web gurus I work with.

    Trial and error later with little success, Brian had an idea to use AutoIt to build an installer with the UNC path embedded. This is then uploaded into a Sharepoint document library and linked to. This worked as desired. After some tweaking, we developed a little application that was all variable based and allowed us to create exe files on the fly. That AutoIt code is as follows:

    Dim $uncpath;
     
    $uncpath = InputBox("UNC Path", "Enter the UNC Path of the EXE");
    If(@error = 1) Then
    	Exit;
    EndIf	
     
    Dim $fileToWrite;
    Dim $fileHandle;
    $fileToWrite = InputBox("File to Create", "Enter the name of the desired executable (w/o extension)", "c:\fileName");
     
    If(@error = 1) Then
    	Exit;
    EndIf	
     
    $fileHandle = FileOpen($fileToWrite & ".au3", 2);
     
    If($fileHandle = -1) Then
    	MsgBox(16, "File Error", "Cannot open file: " & $fileToWrite );
     
    	Exit;
    EndIf	
     
     
    FileWriteLine($fileHandle, "If(FileExists(""" &  $uncpath & """)) Then");
    FileWriteLine($fileHandle, "MsgBox(64, 'Please Wait', 'Loading setup files.  Please wait.', 20);");
    FileWriteLine($fileHandle, "	Run(""" & $uncpath & """);");
    FileWriteLine($fileHandle, "Else");
    FileWriteLine($fileHandle, "	MsgBox(16, 'Sorry', 'You are either off-campus or do not have permission to access this program.')");
    FileWriteLine($fileHandle, "EndIf");
    FileClose($fileHandle);
     
    Run("C:\Program Files\AutoIt3\Aut2Exe\aut2exe.exe /in " & $fileToWrite & ".au3 /out " & $fileToWrite & ".exe /icon c:\jr.ico ");

    The advantage of this is that small files (280k vs 700 mb) can be uploaded to Sharepoint which will then go out and grab the actual setup files for the application to install. While StoragePoint would be great to have to remedy this, it isn’t available due to fiscal responsibility to our budget.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Using Information Rights Management and Workflows

    Posted on July 1st, 2009 Eric No comments

    My new article posted on EUSP about how to use the Information Management policy to use a workflow in managing a contract list.

    Enjoy!

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Employee Training Comments

    Posted on June 25th, 2009 Eric No comments

    Michael Gannotti posted the video that we shot at Sharepoint Saturday Charlotte. If you have any specific questions or comments on how I did something, leave a comment and I’ll get back with you.

    I am hoping to release an updated STP of the template soon.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Sharepoint Saturday Recap

    Posted on June 21st, 2009 Eric No comments

    Wow what an amazing day in Charlotte! There were so many great sessions to choose from. Some time blocks had 3 sessions of interest so picking 1 was very difficult. If you have not been to a Sharepoint Saturday in your area, I highly encourage you to participate in one. Lots of great, free, information divided between various topics.

    Check out the Sharepoint Saturday website for upcoming events in your area. You can also view all the slide decks from the presenters.

    The added bonus of this Sharepoint Saturday was making the personal connections of the social network that’s been evolving on Twitter and Facebook. A lot of great Sharepoint talent in the Carolinas. I’d start to list off everyone but that’d be a long list. I also did a video piece on the Employee Training template with Michael Gannotti so look for that in the upcoming days.

    Also a great announcement from Avepoint about a Press release coming about product information. I won’t say what it is, but trust me, you’ll want to visit their site to grab it. Check their web site for the upcoming press release.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Why I love Sharepoint

    Posted on June 15th, 2009 Eric 1 comment

    I came to an epiphany last night while randomly walking up the stairs. I was going to blog about this aforementioned realization today but was easily distracted with other things.

    All through high school and summers during college, I always worked for a subsidary of the Sauder corporation. They have an old time craft village, make tables and chairs, and are a market leader in ready to assemble furniture. One of my great joys in life is when we bring home a piece of prefab furniture that I get to put together. It means it’s time to bust out the screwdriver and get to work.

    Because of this, I realized Sharepoint is pretty similar. You get a clean slate every provisioned site or site collection to solve business problems. Sometimes you don’t need a lot of tools, sometimes you need more tools like data view web parts and jQuery. The materials, work and tools make the process of problem solving fun, although we all know it can be frustrating at times.

    I like trying to solve people’s problems using the Sharepiont platform. It’s so flexible to use and leverage. I love getting my hands dirty and figuring out how to solve the problems that people bring to me. I find myself wanting to do it for them most often instead of being in my consulting role. I want to get in there and do the work.

    I thought I’d share what gets me excited about Sharepoint. What do you like about it?

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post

  • Admin page in the Employee Training template

    Posted on May 8th, 2009 Eric 1 comment

    This week my focus was to start testing a software upgrade but that got hijacked due to database issues. So I took the opportunity to finish the final features of a customized Employee Training template that we deployed to handle workshop registrations. The last few hurdles I was working on were usability issues to take it from ok with some workarounds to functional as is.

    I created a Administration page for the admins to manage some functions that they’d need to do. Mainly see a list of upcoming workshops, who is attending, being able to email 1 or all users and being able to export the roster to make sign in sheets. We also have a broken iCal function right now but that will be covered when that gets fixed.

    The data view web part on the page gets information for the courses being offered and when the filled seats is clicked, it passes the courseid variable into the registration list to get the users. Nothing too magical here. But wait, we’ve got a phone number field that is displaying all sorts of jibberish like ,#Domain\user,department,etc. Will looking at this user profile, they don’t have a phone number listed in their Sharepoint profile. Easy fix with some XSLT. I found the td that outputs the phone number and changed it to the following.

    
    
      Not Listed
      
      
      
    
    

    Nothing too hard there.

    CSV export. I thought this was going to be impossible or at least very difficult. A little Googling and I found a great, easy to use jQuery solution called table2CSV. Shout out to Kunal Babre, this script rocks! Used option 1 for this scenario. I created a sample page in SPD and added 2 buttons to the page, copied the HTLM and slapped it into a Content Editor Web part. I added an onclick reference to the jQuery function and presto, a popup window with comma delimited data for the list! Wow, great 2 problems solved with little coding, great for us code stupid people.

    Now comes the email requirements. I needed help from Tony Miller, colleague here and our go to guy for jQuery, to help with this. Again we went back to SPD and added an email id on the td that generates the email address for the registrant list. Now we have our selector to grab this information. One major problem though, all the fields are being displayed as rich text, if we stet them to plain text in the SPD data view options, it returns nobr span mumbo jumbo. So we did some more jQuery embedded in a content editor web part.

    $('td.RegList nobr span a').each(function (i) {
    		$(this).parent().html($(this).text())
    	});
    

    What this does is strip all the HTML in the Registrant table, defined by another id we tacked onto the tds, and returns it’s text value. Good, now we can use the information better.

    I added an additional column to the registration list that will hold the hyperlink so that the admins in 1 click can email an individual registrant. Now with some more jQuery, we can fill in that value. We assigned that td an id of MailtoLink so the function would know where to output the information.

    $('td.MailtoLink').each(function (i) { 
            $(this).html('<a href="mailto:' + 
                   $(this).parent().children('td.email').text() + 
    '?subject=Upcoming Workshop' + '">E-Mail Registrant</a>')
            });

    Boom, hyperlink fills the table cell and we are almost done.

    The last bit was to create a mail all users option. I had to turn to Paul Grenier, a moderator over at Stump the Panel on EndUserSharepoint.com. Great information in STP and on the site. Bookmark and RSS it, the content is amazing. Paul came back with some psuedo code and some jQuery to get it working. It can be found here.

    Tony and I had to make some tweaks to get it working. We removed the validation step from it since the information wasn’t manually input, it came from Sharepoint and Sharepoint provided it as an email address. Our final code loos like this, and is attached to the other button, named EmailButton, I created.

    $('#EmailButton').click(function() {
       var validEmails = [];
       var emailstr;
         $(".email").each(function(i) {
         validEmails.push($(this).text());
        });
       var url = 'mailto:' + validEmails.join(';') + '?subject=My%20Subject';
       var emailwin = window.open(url, "EmailWindow");
       emailwin.close();
      });
    }); 

    This process has been a lot of work but has been extremely rewarding. The feedback I’m receiving from the group this is designed for has been so positive and they are very excited. What more can you ask for than for people who are excited to use Sharepoint? Many thanks to Tony, Paul, Laura, and the Twitterverse that has helped with some of these issues.

    Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Stumble This Post