SharePoint Workflow. SharePoint 2010 and 2019 Workflow - VirtoSoftware

Generate Report extended

This activity allows generating a text report from filtered list items as a data source.

The activity loads selected items from the list, creates text report (see schema below) and stores the result in text variable. You can use HTML tags to format report.

The activity can be useful in many scenarios:

  • Create user’s active jobs report, add report into email body and send email.

  • Create client incidents report, add report into email body and send email to client.

  • Create administrator’s warnings report, add report into SMS message and send SMS.

  • Create dynamic CAML queries.

  • Create dynamic email, SMS, instant message contact list.

  • Create any text-based (HTML, XML and so on) documents.

  • etc.

Scheme of the report:


[Row for List Item 1]

[Row for List Item 2]

[Row for List Item N]


To display field value from current list item in the Row Template, you should use the <%FieldName%> construction. The <%FieldName%> construction is active text marker, the activity finds a marker, resolves the field, gets field value and replaces marker with the value in text format. The following code displays the value of the variable name. Field Name can be field Display name, Field ID (GUID) or Field Index (int).

The row template is:

User '<%First Name%>'. His email is '<%E-mail Address%>'.

If value of “First Name” field was “Frank” and value of “E-mail Address” field was, the activity would write the following string in the report:

User 'Frank'. His email is ''.

You can use <%FieldName;#NetFormat%> construction to format field value from current list item. For example: <%Start Date;#D%> uses D - long date output pattern 6/15/2009 1:45:30 PM -> Monday, June 15, 2009.

SharePoint Workflow Designer Phrase

Generate report using this header, this row template, this footer from all items at list url and store result in variable.


Parameter Description
this header Optional. The template for the heading section of the report
this row template Optional. The template for the report rows. Use string <%FieldName%> construction to resolve field value from current list item. FieldName can be field display name, field id (GUID) or field index (int).
this footer Optional. The template for the footer section of the report
All Optional. List item filter. The filter string supports View Name, View ID and CAML string (<Where>...</Where>). Empty filter returns all items. Use <OrderBy>…</OrderBy> element to sort list items.
list url Full list url Ex: http://mysharepoint/MyDocs/Shared%20Documents Ex: http://mysharepoint/Lists/List%20with%20Approve