Today, I’ve build a nice Nintex list workflow to manage the approval of incoming requests. On the SharePoint list I’ve got a Manage requests column that gives me a link to the workflow.

workflowstatus

When I click on the link I get the overview with all my tasks:

workflowsstatus

This is great but now I want to include this link in my search result web parts. So I need a managed property for this column.

I first had a look in my Managed Properties, but there isn’t a Managed Property that matches the Manage Request column.

Then I had a look through my crawled properties. And I still couldn’t find anything. Hmm, is this field not included in the search indexes?

So I used my favorite PnP PowerShell to extract the site where I created my workflow on the request list. There are of course other tools that I could have used, but this PowerShell option to collect all details from a site as XML is very powerful .

<Field DisplayName="Manage requests" Type="WorkflowStatus" Required="FALSE" ID="{9d1696d8-fb8d-491c-b139-96f482e52326}" SourceID="{{listid:Requests}}" StaticName="Managere" Name="Managere” ColName=”nvarchar7″ RowOrdinal=”0″ Version=”80″ WorkflowStatusURL=”_layouts/15/WrkStat.aspx” ReadOnly=”TRUE”>

Starting

Failed on Start

In Progress

Error Occurred

Canceled

Completed

Failed on Start (retrying)

Error Occurred (retrying)

Quite quickly I now found the internal name. “Managere” It looks like Nintex takes the first 8 characters of the workflow name and uses that as the internal name for the field.

So no I looked again in the Crawled properties and I found two properties:

managere

ows_Managere and ows_Manager0. Of course now I had to look at what contains what.

So first steps first. I need to create some managed properties.

So I created ManageRequest and ManageRequest0 and mapped these properties to my Crawled properties.

As I’m in an on-premises environment I can do a full crawl. Luckily I’m also in a development environment so no worries about having too much data. But still I’m having to wait for about 15 minutes for my crawl to fiwaitingnish.

In the mean while I’m updating my display template to include the Managed Properties.

In my display template I’m displaying both the Managed Properties that I just created.

Manage Request now contains numbers Depending on the stage of my workflow I seem to be getting “2”  or “5”. The Mnaged Property  and ManageRequest0 always returns an empty string. That isn’t very helpful.

So I’m now looking at the original link in my list view again.

In Progress

Ok, this might be something that I can replicate. All I need is my list Guid and the Workflow Instance Id and the value that I found in seems to be coming from the Managed property.

Now I just need the instanceID for the workflow.

So now I found a MSDN article. This is going to be development. Or maybe not.

I added a build string action in Nintex and I found the Workflow Instance ID being available.

workflowsinstanceid

This must be my lucky day! Now I can simply update the current item with a workflow instance id and go through the process of creating a Managed Property. The rest is now easy.

 

 

 

 

 

 

 

 

 

 

 

Advertisements