Tuesday, January 26, 2010

Sharepoint Filter List from url

Sometime you need to a have a link to filtered list in Sharepoint. Luckily Sharepoint has the ability to do this. You need to use the following parameters after the list url:

......allitems.aspx?Filtername=<name of field>&FilterMultiValue=<filter text>


<name of the field> is the field name in your list, you wish to filter on (eg. Name etc)
<filter text> is the filter criteria. You can use * as an wildcard. You can add multiple filter text values by separating them with semi colons.

For example:


......allitems.aspx?Filtername=Name&FilterMultiValue=A*;B*

will show all items starting where the Name starts with A or B.

I like this method because it allows you to have multiple values and wildcards. You could also use the FilterField1 and FilterValue1 parameters. (see for more info: Using URL to sort or filter a list).

Thursday, January 21, 2010

Firebug 1.5 not expanding elements on inspect

Just installed Firebug 1.5 (after using 1.4.5 for a long time) and first thing I noticed was that the inspect element did not work correctly. After hovering on an element, the html tab did not show (or expand to) the element. Then I noticed that even manually expanding an element (by clicking on the + symbol) also did not work after 3 or 4 level deep.

After some googling, I finally out it was due to FireQuery. I was using version 0.3 and after updating to 0.5, all issues fixed.

I would also like to use the opportunity to thank the Firebug team and ofcourse FireQuery for their great tools!

Thursday, December 17, 2009

Windows 7 - Change theme font properties

Just a quick tip: If you want to change your desktop/theme font, you are looking for the old windows properties tab. You can easily get this on the screen by opening a Run dialog box (Windows + R keys) and then type Control Color and hit enter to directly open Window Color and Appearance box.

Tuesday, December 15, 2009

Terminating XMBC remotely on Ubuntu

Last few weeks I have been testing XMBC 9.11 Alpha/Beta on my Ubuntu Media system. Personally I think it is the best Media manager/player ever :).. But due to the fact it is still a beta release, the application sometimes does not respond or hangs and completely blocks the system.

The easies way to kill it and free your system without a reboot, is just open putty.exe and login remotely to your ubuntu system and issue the following command:

killall -9 xbmc.bin

This will terminate XBMC and will free your system. In my case I just restart XBMC :)

Merging items with same title in gantt view in Sharepoint

Today, got a challenge with Sharepoint where a user wanted to see multiple entries in a gannt view in Sharepoint. Below is the jquery magic you can use in a CEWP.

function docready() {

var row = [];
var ix=0;



$('tr.ms-ganttTaskRow th').each(
  function() {
    row[ix] = $(this).parent();
    ix++;
  }
);


ix=0;
for(ix=1; ix< row.length; ix++){
   var $prevrow = row[ix].prev();
   var prevtxt = $prevrow.find('th').text();
   var curtxt  = row[ix].find('th').text();
   if (prevtxt == curtxt) {
     var colix =0;
     row[ix].find('td').each(
       function() {
         var ht = $(this).html();
         if (ht.length > 0){
           $prevrow.find('td:eq('+colix+')').html(ht);
         }
         colix++;
       }
     );
     row[ix].remove();
   }
}

}

_spBodyOnLoadFunctionNames.push("docready");


Explanation of the code:

  1. Trigger the docready on load
  2. Store all the rows in an jquery array for easy processing
  3. Walk through the rows array starting from second item and match the row header with previous row, if so, copy the contents of the columns to the row above and remove after processed.
There is only one catch, the gantt view needs to be sorted on the row header column.

Tuesday, November 17, 2009

Killing tasks/processes from the command line in Windows 7

Sometimes you quickly need to kill a task in Windows (mostly from the command line). With Windows 7 this can be done by using the taskkill command. First thing you need to do is start a command line with administrative priviledges:

Type in command in the start menu, when the Command Prompt shows up, right click and select Run as Administrator.


 


After a warning message (if UAC is turned on), the command line is shown. Before we kill something, we need to know what we would like to kill :). This can be done by issuing a tasklist command.



The tasklist command will show all the running tasks (similar to task manager). This list can be quite long depending on your system. You can quickly filter by issuing the /M switch, eg.

taskkill /M vm*

will show all tasks (and modules) starting with vm in the name

Now killing the task is the easy part. Just issue a taskkill /IM with the name of the task:



The /IM specifies that we are using the image name and the /F at the end is used to specify we would like to kill the process forcefully. You can also kill a task by PID (process id) by using the /PID instead of /IM. It also allows you to kill multiple tasks eg:

taskkill /PID 230 349 230 /F

will kill processes 230, 349 and 230 simultaneously. The taskkill has much more functionality, eg killing multiple task based on filters, for example:

taskkill /IM note* /FI "windowtitle eq untitle*"
 

will kill every task name starting with note (eg notepad) and where the title starts with untitle, with other word kill all instances of empty notepad.

Enjoy!




Monday, November 9, 2009

Cisco VPN 5.0.00.340 after Windows 7 Update

2 weeks ago I have updated my laptop to Windows 7 and today I wanted to use my VPN account. When trying to connect, I got an error 440 Driver Failure. Fixing this issue was quite easy, however you do need to have the Cisco VPN installation files.

Goto start, type "add remove"  and select Add or Remove programs



From the list of installed applications, scroll to the Cisco VPN item and press repair.



If your original installation files are still in the same folder, all will go well, otherwise you will get a popup screen asking for the installation files. Luckily I have my backup and it was easy to find them :)
It works like a charm now!