You can pretty much use the same VBA syntax for calculated fields as in Excel. Here is a site that provides many examples of common formulas that can be used in SharePoint when defining "Calculated Field" columns.
Here is a formula that I created at work:
=IF(YEAR([Due Date])=1899,"No Due Date",TEXT([Due Date],"MM/dd/yyyy"))
Blank dates in SharePoint are assigned a date in year 1899. The above formula displays a message "No Due Date" for invalid dates or the valid date using format MM/dd/yyyy.
Thursday, October 18, 2007
Sunday, October 14, 2007
Speaking at DevTeach in late November 2007
I am scheduled to speak at the DevTeach conference in Vancouver on Wednesday, November 28, 2007 from 11:00 AM to 12:15 PM. The topic I will be presenting is the same topic I gave to the .netBC group on Wednesday September 12, 2007. That presention took 2 hours. Therefore, I must shave off about 45 minutes from that presentation.
The DevTeach conference is moving outside of Montreal for the first time. I attended it twice in spring 2005 and spring 2007. It is definately a very worthwhile conference. If you want to be on top of current and up-coming technologies in our very fast moving profession, it is a good use of three days.
Jean-Rene Roy, who is the owner of the DevTeach & SQLTeach shows, is organizing a very different type of conference in Vancouver. New to Vancouver will be an XNA track, a Halo-3 competition, and a free beer party with Palermo. It looks like it is going to be a lot of fun. Here is more on the various activities:
XNA contest: http://www.devteach.com/contest.aspx
Party with Palermo! Free beer: http://www.partywithpalermo.com/
For the first time a XNA track at a independent conference: http://www.devteach.com/Session.aspx#79
Three very good Pre-con Post-Con:
http://www.devteach.com/PreConference.aspx
http://www.devteach.com/PostConference.aspx
Key note by Ken Levy on VSX: http://www.devteach.com/Keynote.aspx
The DevTeach conference is moving outside of Montreal for the first time. I attended it twice in spring 2005 and spring 2007. It is definately a very worthwhile conference. If you want to be on top of current and up-coming technologies in our very fast moving profession, it is a good use of three days.
Jean-Rene Roy, who is the owner of the DevTeach & SQLTeach shows, is organizing a very different type of conference in Vancouver. New to Vancouver will be an XNA track, a Halo-3 competition, and a free beer party with Palermo. It looks like it is going to be a lot of fun. Here is more on the various activities:
XNA contest: http://www.devteach.com/contest.aspx
Party with Palermo! Free beer: http://www.partywithpalermo.com/
For the first time a XNA track at a independent conference: http://www.devteach.com/Session.aspx#79
Three very good Pre-con Post-Con:
http://www.devteach.com/PreConference.aspx
http://www.devteach.com/PostConference.aspx
Key note by Ken Levy on VSX: http://www.devteach.com/Keynote.aspx
How to hide "View All Site Content" link for anonymous users in SharePoint WSS 3.0?
This solution requires you to install Microsoft Office SharePoint Designer.
<div class="ms-quicklaunchheader">
<SharePoint:SPLinkButton id="idNavLinkViewAll" runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent%>" AccessKey="<%$Resources:wss,quiklnch_allcontent_AK%>"/>
</div>
</SharePoint:SPSecurityTrimmedControl>
- Go to "Site Actions" ==> "Site Settings"
- Under Galleries, click on "Master Pages"
- Select default.master and select "Edit in Microsoft Office SharePoint Designer".
- In "Design" view locate "View All Site Content" on the left-hand-site navigation bar and click on it.
- Go to "Code" view. You will see the following code highlighted:
<div class="ms-quicklaunchheader">
<SharePoint:SPLinkButton id="idNavLinkViewAll" runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent%>" AccessKey="<%$Resources:wss,quiklnch_allcontent_AK%>"/>
</div>
- Change the PermissionString attribute value of the Sharepoint:SPSecurityTrimmedControl XML element from ViewFormPages to BrowseDirectories.
- Save the default.master. If you login as an anonymous user you will not see the "View All Site Content" link. However when authenticated you will see this option.
Tuesday, October 9, 2007
Adding command prompt option to Windows Explorer in Windows 2003 server
1. Navigate in your Registry to
HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell and create a key called "Command Prompt" without the quotes.
2. Set the default string to whatever text you want to appear in the right-click menu
3. Create a new key within your newly created command prompt named "command" and set the default string to:
Cmd.exe /k pushd %L
4. The changes should take place immediately. Right click a folder and your new menu item should appear.
HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell and create a key called "Command Prompt" without the quotes.
2. Set the default string to whatever text you want to appear in the right-click menu
3. Create a new key within your newly created command prompt named "command" and set the default string to:
Cmd.exe /k pushd %L
4. The changes should take place immediately. Right click a folder and your new menu item should appear.
Friday, October 5, 2007
Making a SharePoint custom column visible in an edit list form
- Go to the list you are interested in
- Click Settings --> List Settings
- Under General Settings --> Click Advance Settings
- Click "Yes" for "Allow management of content types?"
- Click "OK"
- Click the list you are interested in under "Content Types"
- Now Click "Add from existing site or list columns"
- Click "Add >" to select the columns you want
- Click "OK"
- Go to the list you are interested in
- Click Settings --> List Settings
- Under General Settings --> Click Advance Settings
- Click "No" for "Allow management of content types?"
Thursday, October 4, 2007
How to get list and view GUIDs in WSS 3.0 or MOSS 2007?
List GUID
- Access the list with your browser
- Go to Settings->List Settings
- Copy the URL from your browser address line into a text editor. It should look something like this: http://something.com/_layouts/listedit.aspx?List=%7BB2FD569F%2D89B3%2D4150%2DA9BA%2D1D7F5F9437AA%7D
- Delete everything upto (and including) List=
- Replace %7B with {
- Replace %7D with }
- Replace %2D with -
- In the above example, the GUID would be {B2FD569F-89B3-4150-A9BA-1D7F5F9437AA}
View GUID
- Access the list with your browser
- Go to Settings->List Settings
- Copy the URL from your browser address line into a text editor. It should look something like this: http://something.com/_layouts/ViewEdit.aspx?List=%7BB2FD569F%2D89B3%2D4150%2DA9BA%2D1D7F5F9437AA%7D&View=%7B6E1DB03C%2D9083%2D45FD%2D9487%2DDCF420E4F245%7D&Source=%252Foperations%252Fskutracker%252F%255Flayouts%252Flistedit%252Easpx%253FList%253D%25257BB2FD569F%25252D89B3%25252D4150%25252DA9BA%25252D1D7F5F9437AA%25257D
- Copy the data between View= and &Source
- Perform the same replacements as explained for List GUIDs above
Wednesday, October 3, 2007
Finding out the SharePoint list ID (ListTemplateId)
SharePoint 2007 offers an enhanced ability to catch certain user events such as ItemDeleting (before the fact) and ItemDeleted (after the fact). The API targets specific lists identified by list IDs. Example:
You can find out the list ID of any other list as follows:
| List template type | Template ID |
| Custom List | 100 |
| Document Library | 101 |
| Survey | 102 |
| Links List | 103 |
| Announcement List | 104 |
| Contacts List | 105 |
| Events List | 106 |
| Task List | 107 |
| Discussion Board | 108 |
| Picture Library | 109 |
- Go to your 12 hives FEATURES folder C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES
- Find the folder for the list you are interested in and open it.
- Open the ListTemplates folder
- Open the XML file and read the value of the Type attribute.
- This information can also be found in the ONET.XML file in the appropriate site template directory under C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates
Subscribe to:
Comments (Atom)