Archive for January, 2010

How to configure a workflow to start at specific time, then loop / repeat periodically (Daily, Weekly)

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

How to configure a workflow to start at specific time, then loop / repeat periodically (Daily, Weekly)

The following method can be used to start a workflow at a specific time, then repeat periodically (each day). Periodic Workflow Processing (send daily email notification or reminder) A useful implementation of this technique allows you to configure workflows to run as background tasks at a specific time instead of being triggered by a user manually, or after creating or modifying a list item.

How to configure a workflow to start at specific time, then loop / repeat periodically (Daily, Weekly)

SharePoint XSL String Replacement Function

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off


SharePoint XSL String Replacement Function
Using a custom XSL template with a Data View web part, a Lookup column in SharePoint which allows multiple selections can be used to replace ; with a new line and bullet.  The following article describes how to use a custom XSL template in a Data View Web Part to create the equivalent to an XSL string replace function which then splits and formats the string of multiple selections, delimited with a semicolon (;).


SharePoint XSL String Replacement Function

Get current time in Sharepoint Designer workflow

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

Q: How do i get the current time in a SharePoint Designer Workflow?  When I try to test if the due date and time is less than two hours away, the condition doesn’t work as I am only able to select [today] from the options, which seems to ignore the time component of the current date.

A: You can create or modify another list item using the workflow, then get the ‘Created’ or ‘Last Modified’ date of the item to get test against the current time.
This may result in the current time being a few minutes late, but works well.

See Get current time in Sharepoint Designer workflow for details.

Split List View web part labels (javascript)

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

Split form item / column titles when creating, editing or viewing a SharePoint list item or survey. If question/column names are too big to fit in one line, this JavaScript function can be used to split the label/question, by adding a break tag.

InfoPath data connection not returning all results

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

In an InfoPath Form, I had a Data Connection to a SharePoint list which has almost 500 items.

When I open or preview the form, only 100 items are being returned from the SharePoint list using the Secondary Data Source of the SharePoint data connection.

InfoPath loads items from SharePoint which appear in the default view of the specified list or library. By default, SharePoint limits the total results of a view to 100, which can be changed by modifying the default view.

See InfoPath data connection not returning all results from a SharePoint list for details.

SharePoint Designer (2007) – Run reports for all sites programmatically

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

Generate a list of all sites from a site collection then use the list to process reports on every site using SharePoint Designer 2007. A macro is used in SharePoint Designer to process a report for each site.

SharePoint Data View Conditional Formatting using SharePoint Designer

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

A tutorial for creating Data Views for a list in SharePoint that are formatted based on each item\’s meta data. This can be used to create views that visually represent task priority or due dates by setting font or table row background colors. SharePoint Designer conditional formatting is used to format items and backgrounds colors based on the length of time until due or the priority.

SharePoint Data View Conditional Formatting using SharePoint Designer
A tutorial for creating Data Views for a list in SharePoint that are formatted based on each item ‘s meta data. This can be used to create views that visually represent task priority or due dates by setting font or table row background colors. SharePoint Designer conditional formatting is used to format items and backgrounds colors based on the length of time until due or the priority.

When the due date is overdue, the task is displayed in red, or can have a red background for the row. When the due date is 1 day from the current date, the item is orange, and so on.

The same concept can be applied using the value selected in the Priority field of each task in the task list to format the background or text of each item.

When the conditional formatting is combined with sort criteria using the same Priority or Due Date field, the result is a view of the task list which easy to read and understand, and can also improve the overall aesthetics if the color scheme is selected appropriately.

Integrate InfoPath Form with SharePoint Workflow

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

How to integrate InfoPath forms with workflow in SharePoint to give greater control over the functionality and user interface.

Use an InfoPath form as the interface for a workflow in SharePoint to allow greater control over the user interface and functionality. Code can be used in the form which is processed by the client if completing a form using Microsoft InfoPath, or in a browser based InfoPath form supplied using SharePoint Forms Server. This reduces processing requirements of the SharePoint server(s), as well as allowing processing using code without worrying about code blocks in SharePoint.

Integrate InfoPath Form with SharePoint Workflow

InfoPath – Update Existing SharePoint List Item Programmatically Using CAML

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

Create secondary data connections in an InfoPath form to retrieve the CAML template from an XML file, then submit using a second data connection to the Lists web service on the SharePoint site containing the list being updated.  The CAML template uses the UpdateListItem function from the web service to update an existing item in a SharePoint list.

This article demonstrates how to programmatically update a SharePoint list item from an InfoPath form using a CAML query to the Lists web service of the SharePoint site. The example uses secondary data connections to retrieve the CAML template from an XML file and another to submit the CAML template to a SharePoint web service using the UpdateListItem function.

The process is broken down into the following components, which are explained in detail in the article linked above.

1. Create Initial InfoPath Form
2. Set up the CAML query
3. Set up InfoPath Data Connections
4. Set up the Form Template and Required Code

Optional Steps and additional information:
- Update Repeating Field elements in the CAML Template Programmatically
- How to Submit using a Secondary Data Connection in InfoPath

Update Existing SharePoint List Item

InfoPath – Update Repeating Elements/Nodes in a Secondary Data Source

Posted on January 25th, 2010 by Master-SharePoint  |  Comments Off

Programmatically loop through each node in an xml data source to find a specific element/node by the attribute value.  This may be required to populate a CAML template before submitting to SharePoint via a web service.  Post comments discuss a scenario where the function provided in the article can be used.

See also InfoPath Code – Loop through items in a secondary data source from a SharePoint List for the details of a solution which implements the function provided in the article, as well as a modified version.