Skip navigation
All Places > Getting Started > Blog > 2014 > November
2014

Products: Nintex Workflow 2013, Nintex Workflow 2010

 

Sometimes it can be helpful to replicate the behavior of the Nintex Workflow Query List action outside of the Nintex Workflow environment. After UI is stripped away, Nintex Workflow executes a CAML query using the SharePoint API to return the values specified in the Query List action.

 

Using this PowerShell script you can replicate this behavior to help narrow down issues with your query (such as List View Threshold violations, Permissions issues, etc.).

 

To replicate the Query List action in PowerShell do the following:

 

  • Open the Query List action in your workflow.

        CAMLQuery.png

  • Change the Editor mode to be CAML editor.

        CAMLQuery2.png

  • Copy the CAML/XML between the <Query> tags.
  • Paste the CAML/XML into the script replacing the example.

 

 

Note: The <Query> tags must be removed for the query to function correctly.

 

Run the below (attached as well as a *.txt file for your convenience) PowerShell script (PowerShell ISE works well) from a SharePoint Server:

 

 

PowerShell Script
  1. Add-PSSnapin Microsoft.SharePoint.Powershell
  2. $QueryObject = New-Object Microsoft.SharePoint.SPQuery
  3. $QueryObject.Query = '
  4. <Lists>
  5.    <List ID="{00000000-0000-0000-0000-000000000000}" />
  6. </Lists>
  7. <ViewFields>
  8.    <FieldRef Name="Title" />
  9. </ViewFields>
  10. <Where>
  11.    <Gt>
  12.      <FieldRef Name="ID"  />
  13.      <Value Type="Counter">1</Value>
  14.    </Gt>
  15. </Where>
  16. '
  17. $($(Get-SPWeb http://contoso.com).Lists[[Guid]'{00000000-0000-0000-0000-000000000000}']).GetItems($QueryObject)

 

To use the script do the following:

  • Replace http://contoso.com with the URL of the site you wish to execute the script against.
  • Replace the Guid in the last line of the script with the Guid found in the CAML query extracted from Nintex.

Products: Nintex Workflow 2013, Nintex Workflow 2010

 

Today a request came in to assist in removing 9,000~ duplicate Content Type Workflow Associations from a list (previous versions). Since it did not matter whether or not any workflow associations for that content type remained on the list (it is easy enough to re-add the workflow after) this script was developed to remove all workflow associations for that content type.

 

Note: All other content type workflows (other content types) and regular list based workflows will remain unmodified.

 

Run the below (attached as well as a *.txt file for your convenience) PowerShell script (PowerShell ISE works well) from a SharePoint Server:

 

 

PowerShell Script
  1. Add-PSSnapin microsoft.sharepoint.powershell
  2. $(Get-SPWeb http://contoso.com).lists["YourListTitle"].ContentTypes["YourContentTypeName"].WorkflowAssociations | ForEach-Object {$(Get-SPWeb http://contoso.com).lists["YourListTitle"].ContentTypes["YourContentTypeName"].RemoveWorkflowAssociation($_)}

 

To use the script do the following:

  • Replace http://contoso.com with the URL of the site you wish to execute the script against.
  • Replace YourListTitle with the title of the list/library you wish to execute the script against.
  • Replace YourContentTypeName with the name of the content type the workflow is attached to.

As of today, you'll see some changes on the Nintex community site, which should help you find your answers faster, as well as identify different groups in the community site! So what will you see...

 

I have the same question!

Ever come across a post where you have the same question or experienced the same issue? You'll now see the option to click on "I have the same question" which appears on every post.

same_question.png

 

A more helpful "helpful"

Let others know if a response helped you or not. It'll tally up the helpful responses each time, making it simplier to identify a reponse which provided the most help to the community.

helpful.png

Identify Nintex employees and community champions

We've introduced new role badges which allow you to quickly and easily identify a Nintex employee, or one of our Nintex support guys. We will also soon be introducing a badge to identify the experts and champions in the community. The badge appears next to the members name, and I've included a list of the different badges here.

 

Nintex Employee16-employee-orange.png
Nintex Support 16-support.png
Nintex Expert16-champion.png
Nintex Community 2014 Champion16-winner2.png

Nintex Virtual Technical Evangelists (vTEs)

Nintex virtual Tech Evangelists are a select group of experts on Nintex products from Nintex's worldwide Partner community

vTE-oragen-16px.png

 

Want to reduce your email notifications?

Any time you receive an email notification from the Nintex community site, there will be an option at the bottom of the email to quickly turn off email notifications.

 

Changes to your activity stream

Your activity stream will be changing too, showing you more relevant content not just what was just created or modified. You'll now see more of a focus on top and trending activity, trending people, recommended content, recommended people and recommended places.

Filter Blog

By date: By tag: