Month: December 2012
-
Using jQuery to hide some columns, append a new column, and popup the contents of the hidden columns
In this previous post, I showed how to hide the 4th and 5th columns of a SharePoint List (I am not talking about EditForm.aspx page, I am talking about the table view). I took this a step further and appended a new row containing an “more info” onClick event that pops up the contents of…
-
Using _spPageContextInfo, AJAX and SAMAccountName to show a hidden item in a SharePoint page.
I wanted to have a link on a page (could be anything) show only for certain people. I knew there was variable on every page named _spPageContextInfo.userId, which is the current user’s SharePoint user Id. I used the following code to take that userId and query the User Information List to get the SAMAccountName, and…
-
Looping through a SharePoint List column and acting on each item in the column using jQuery
I wanted to loop through a couple columns in the Default View of a SharePoint List. The jQuery code below would loop through the 4th, 5th, and 10th columns and alert the contents of that column. Obviously you can do anything you like with the matches. More tomorrow on how I was using this method
-
PowerShell: foreach with a first and last item number
I wanted to work through 1000+ items in a PowerShell foreach loop, but I wanted to do it X at a time. I figured out the following foreach syntax to loop through all items after first and before last:
-
Knockout alternate formattting
I was using KnockoutJS to loop through and display some data. I wanted to apply some alternate formatting on every other row. I used this syntax containing the MOD operation to achieve the formatting I wanted. The other thing I learned was that $index() is observable, so I can +1 it? I believe that is…
-
Using PowerShell to add a Contact to a CRM 2011 MarketingList (SOAP)
We had a user delete a Marketing List. I needed to recreate it. I went to a database backup and found the GUID of the deleted list. Then I used the following SQL query to find the GUIDs of all the members of that list: I saved the EntityId column to a text file, and…
