Newbie Nintex 2010: Workflow to query Library where Title != Name


Badge +2

New to Nintex 2010.  confused.png

Hello.

I would like to create a workflow that queries a library for documents where Title does not equal Name, log in history and show the document item's info (and link) in a view for the document owners to track.

In my brain:

Query Library for Docs where Title does not equal Name and add Doc ID into collection variable.

Then for each document get ID, Title, Name, Owner, Last Modified Date and dynamically display into a view (is this from logging into History list). I do not need to keep track of any items that have been corrected. Not sure how to go about this.

Please know I appreciate any assistance.

Thanks,

Denise


13 replies

Userlevel 6
Badge +16

You are right. This is a good way to do it, although if you have many items to be saved the log history has a limited capacity.

Another option should be (without Nintex):

-Create a Sharepoint List View with a filter (Title!=Name)

Badge +2

Hi Fernando,

Thanks for your help. My problem is that when I create the filter where Title does not equal the Name all show true. Looks like the Name field has the .docx extension within it so everyone of the documents shows true to the statement. Not sure how to get around this.

Thanks,

D

Badge +11

Hi Denise,

if you have only files inside with a 4-letter ending like docx and xlsx, you could use a calculated column to strip the file extension of the filename. There is an msdn article about calculated field formulas. See the "Remove Characters from Text" paragraph. But be careful if you don't use an english SharePoint. English formulas and syntax won't work for other languages most of the time.

Regards

Philipp

Badge +2

Hi Phillip,

Thanks for your help. However, I am still unable to create a view for what I need. Name field is not available when you try to create a calculated column and creating a calculated column adding extension to a new title field does not work as well. Not sure what I am missing or if a view is able to be used. Which puts me back with creating something within Nintex 2010.

Thanks,

Denise

Badge +11

Hi Denise Dietz,

You can still go with list view. For this, you create a new column of Single line of text type called OnlyName. Create a workflow to execute when item is created. Add action in the workflow to set a field's value, Set OnlyName = Context item display name. Publish the workflow with this one step.

Run the workflow on few items manually if they already exist in the library. Then create the SharePoint list view filter based on this field i.e. Title!=OnlyName.

You don't have to worry about the field being populated as it would take few sec's for workflow to run and populate this field. See if it works else we can try the query also.

Badge +2

Thanks so much!!!!! Testing it now and so far it looks great.

I appreciate the help from everyone!!  happy.png

Denise

Badge +2

Hi Kapil,

Quick follow-up. This runs perfect on new items created. Is there a way to push this to the documents already in the library?

Please know I appreciate your time!!

Denise

Badge +11

Hi Denise,

For the existing documents, populate the new column without the extension.

So easy way would be to go to datasheet view/quick edit, copy all the names to notepad (don't close the view), replace .docx/.xlsx/.pdf with nothing. Then paste them back in the new column in the same order. It will automatically filter them.

Badge +2

So close. did as stated above but when I create the filter where the NameOnly field is not equal to the Title I get all rows included in view. Copy and paste something wrong?

Badge +11

Check if there are any trailing spaces in the NameOnly field. Should exactly the same.

Badge +2

Did a TRIM on the column and still get the same results.   sad.png

Badge +11

The filter should work as long as the data is correct. You have to compare the title and the NameOnly column. Copy the content of these two in a notepad or word, then compare side by side. Do you get different results if you create the Filter where Title = NameOnly?

Badge +2

Good morning Kapil,

The problem was simple. Didn't realize SharePoint is Excel based in the formulas and once I used the EXACT function everything filtered correctly.

Thank you for your help. I truly appreciate it!!!  happy.png

Denise

Reply