
The above query is to find the items which has Date column with value,Less than Today's Date , in a Descending manner. That is, the date before today will be the first result.
You can find out when was the last item entered with this query.
Monday, March 31, 2008
SPQuery Examples
Thursday, March 27, 2008
Deploy Webpart as Solution Package and Feature
To create a Webpart Solution Package and to Deploy it into sharepoint enviornment ...
1. You need to create an xml file called "manifest.xml" in webpart project.
2. Add a cab/setup project into webpart project .
3. Finally use Stsadm to add your solution to the sharepoint.
To activate/deploy the soution , you can go into sharepoint solution management in operations in Central Admin. OR can use Stsadm to deply the soution.
Details:
http://leedale.wordpress.com/?s=deploying+a+webpart
To Deploy a WebPart as a Feature ...
1. You need Feature.xml and Elements.xml.
2. Features are usually wraped in solution package.
3. So we need manifest.xml also.
Details :
http://www.sharepointnutsandbolts.com/2007/05/deploying-web-parts-as-feature.html
How to Creating a solution package to deploy Webpart feature:
Details :
http://www.sharepointnutsandbolts.com/2007/07/building-and-deploying-sharepoint.html
Tuesday, March 25, 2008
Useful Links for changing Look and Feel
Creating USer control : http://www.helloitsliam.com/archive/2008/01/21/sharepoint-%E2%80%93-user-control-in-master-page-page-footer.aspx
Modify Search Button: http://geeksconnected.com/muhanad/Lists/Posts/Post.aspx?ID=15
http://www.heathersolomon.com/blog/category/8.aspx
http://www.thesug.org/blogs/kyles/Lists/Posts/Post.aspx?ID=5
http://www.novolocus.com/category/sharepoint/branding/
SPSiteDataQuery

You Can query multiple lists/Libraries of same kind for common fields in them. This Query returns a Datatable,which can be used as a source to a Calendar or GridView etc.
Query above will serach all the lists(Specified by Basetype = '0') for column name "EventDate" and value as Today's date. And returns Title , EventDate,Description,ListName(custom field in event List) in a form of a Table.
You can also Specify the List's to search in the scope! You need to provide the Guid of the List for that .
Sunday, March 23, 2008
Tuesday, March 18, 2008
User control in Master Pages
Put the User control in Master Pages, and make them show up on all the pages.
You can make some useful controls like checking user details n display user names on master page.
How to Create a Control and put it in Master pages is well described by Liam cleary,at thr link below:
http://www.helloitsliam.com/archive/2008/01/21/sharepoint-–-user-control-in-master-page-page-footer.aspx
I created a control to check the logged in user's group and the change the master page on fly.
Sunday, March 9, 2008
Download Calandar Webpart, Displays Event Details OnMouseOver
Calendar Web Part enables you to view all schedules in a compact and comfortable view. See all your appointments by putting the mouse over the day you are interested in. Calendar Web Part may be connected to any list on WSS 3.0/MOSS 2007 site.
You Can download from : http://software.techrepublic.com.com/download.aspx?&q=Sharepoint+Calendar+Web+Part+%28zip%29&docid=333854&promo=100511
Saturday, March 1, 2008
State Machine Workflow - Preparing Association & Initiation Forms
There are two types of workflow Sequential and State Machine, to know more see :Types of Workflows
In this example I will make a Simple State Machine Workflow with Three Infopath forms and Three states. This workflow will take the name of the Approver in Association form,and then When invoked on a Item,displays a Initiation form to add Comments with the item and will create a Task for the Approver/Manager defined in Association form for Approval. If Approver Approve's the task then the workflow is said to be complete or else will be in InProgress.
Contents :
We have Three States in this State machine Workflow.
1) Start State
2) Manager Review State
3) Final State.
And Three Infopath Forms Which are:
1) Association form - For getting the name of Approver.
2) Initilazion form - For adding Comments To the item
3) Task(Review) form - To display for Approval.
Now Lets Get Started, We will first Create an Association, Intitiation and Task Review Form in Infopath 2007.
Steps:
1. Create an Infopath Form,click Design a form and then Choose a Blank Form.
Imp: Make sure that the form is Browser Enabled, i.e the little checkbox displayed below the blank form is checked.
2. Now Design the form with a One table Layout and Name it Association form(You can name it something meaningfull).
3. Now Lets create the DataSource. Firstly double click on myfields and Rename as Main.
4. Add Two Fields Approve and Comments as Text to the Main datasource and drag the Approve field to the form. Create a button “Ok” as below(image).Your Infopath Form looks like this:.bmp)
So, To do this we added a Comments field here in this form, just to make an Entry for it in Association form Schema.
We will Create a Class file from this Association fom Schema and will add it into our Workflow.
6. Now double click on OK button and Add a rule for it. Then Add Action. In the action dialog, select Submit using a data connection from the dropdown list.Click Add and on the next screen, choose to create a new connection to submit data.
10. Now To create a Class file from association form Schema right click File menu, and chose Save as source.
11. Choose a folder Source(make new folder) and then ok.
12. Now we will create a class file to be used in workflow.
13. Open the Visual studio Command prompt, and move to the path of Source folder.
14. Now write the command xsd myschema.cs /c to generate class file from association form schema.
Lets Create an Initiation form now.
Repeat the first three steps above and then create a single field under Main as Comments.
Drag it on to the form. Create a Submit button from controls and repeate step from 6 to 9. .bmp)
Last form is the Taks Form/Review Form.
Steps:
Create a form with title “Manager review”.
Now create a dtasource and add a Yes/No filed. This is a checkbox to tell the document is approved. Name the field as Approve.
Create a button ok and repeate stepts 6 to 9 to create a rule for button and finally Save and Publish the form..bmp)
We are ready with the Infopath forms Now.
Labels
- List and Libraries (5)
- Master Pages(Look and Feel) (3)
- Site Defination (2)
- SP Interview Questions (4)
- SP Knowledge Pack (4)
- SP Query (4)
- WebParts (6)
- Workflows (4)
