You are viewing limited content. For full access, please sign in.

Question

Question

search field equal to another field

asked on June 23, 2015

How can I search for any documents that have two identical fields within the same document?

I am guessing the syntax should be something like...

{[]:[fieldname]=[fieldname2]}  

or something like

{[]:[fieldname]<>[fieldname2]}

 

Reasoning...

During a recent conversion we created some new fields that after further review didn't need to be created. That is we may not need them. In the interim we created new documents with both [fieldname] and [fieldname2].  Creating a search report should allow us to compare documents where [fieldname] is different than [fieldname2].  Final step would allow us to use the report to either manual make changes or drive a WF based on the same search criteria. 

 

0 0

Answer

APPROVED ANSWER
replied on June 24, 2015

Workflow is a good tool for this kind of comparison, since the search syntax doesn't handle comparative searches like this. You can run a search for documents that have any value for both fields, loop through those documents and compare them, then perform whatever action it is you wanted to take (generating a report, automatically picking on value, putting both values in a third, multi-value fields for easy comparison/search, etc.).

The search syntax for both fields with any value would be: {[]:[fieldname]="*", [fieldname2]="*"} 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.