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

Question

Question

Weblink Search URL only searches on first part of the search command

asked on April 27, 2022 Show version history

This is annoying, but I'm hopeful that someone has some information.  We are using a Weblink search URL (we use them frequently) to find draft copies of our incident report documents.  For some reason, the search string only performs the search on the first part of the search command.  For example, if I use this (bold added for emphasis):

(server)Search.aspx?dbid=0&searchcommand={LF:LOOKIN=%22\IT\Testing\LFForms\Incident%20Report%20Drafts%22}%20&%20{[]:[RM%20Incident%20Report%20Number]=%2210860%22}&cr=1

 

This returns EVERYTHING in the indicated path.  If I reverse the order like this:

(server)Search.aspx?dbid=0&searchcommand={[]:[RM%20Incident%20Report%20Number]=%2210860%22}%20&%20{LF:LOOKIN=%22\IT\Testing\LFForms\Incident%20Report%20Drafts%22}&cr=1

 

This returns EVERYTHING with the indicated report number, including the non-draft copies that we DON'T want to include.  Anybody have experience with this issue or thoughts on what I might be doing wrong? 

Using Weblink 10.2.0.264

 

EDIT:  I just realized my custom search is doing the same thing.  It disregards anything after the first search criteria with this custom syntax:

0 0

Answer

SELECTED ANSWER
replied on April 27, 2022 Show version history

Is this a url you are building yourself? The "&" connecting the clauses needs to be url encoded also. Unescaped, it is understood to be the end of the query string parameter, i.e. the search string. The custom search is similar - I believe we recently fixed this bug. I'll have someone confirm what release it was fixed in.

Edited to add: the related bug fix is included in 11.

3 0

Replies

replied on April 27, 2022

{LF:LOOKIN=%22\IT\Testing\LFForms\Incident%20Report%20Drafts%22}%20&%20{[]:[RM%20Incident%20Report%20Number]=%2210860%22}

Try using this string below after searchcommand=

%7BLF%3ALOOKIN%3D%22%5CIT%5CTesting%5CLFForms%5CIncident%20Report%20Drafts%22%7D%20%26%20%7B%5B%5D%3A%5BRM%20Incident%20Report%20Number%5D%3D%2210860%22%7D

 

{[]:[RM%20Incident%20Report%20Number]=%2210860%22}%20&%20{LF:LOOKIN=%22\IT\Testing\LFForms\Incident%20Report%20Drafts%22}&cr=1

 

Try using this string below after searchcommand=

%7B%5B%5D%3A%5BRM%20Incident%20Report%20Number%5D%3D%2210860%22%7D%20%26%20%7BLF%3ALOOKIN%3D%22%5CIT%5CTesting%5CLFForms%5CIncident%20Report%20Drafts%22%7D

2 0
replied on April 27, 2022

Ah-ha!  I often avoid encoding ABSOLUTELY everything.  That's probably not a great practice, but I have thus far found that the browser will forgive things like square brackets, and it makes it a little more readable.  I didn't know about the need to encode the ampersand, but it's working now!

 

Thanks to both of you for your feedback!

0 0
replied on April 27, 2022

Found this great site that has made it easier for me.

 

 

https://www.urlencoder.org/

 

 

1 0
replied on April 27, 2022

I know what you mean... it's unfortunate that so many of the characters in a search string require escaping, it does make it hard to read.

0 0
replied on April 27, 2022 Show version history

Hi Sean, 

Looking at your custom search string I see 2 issues so far. &cr=1 should not be part of your string and also you need to replace all the  },[] in your string.

(server)Search.aspx?dbid=0&searchcommand={LF:LOOKIN=%22\IT\Testing\LFForms\Incident%20Report%20Drafts%22}%20&%20{[]:[RM%20Incident%20Report%20Number]=%2210860%22}&cr=1

try this after searchcommmand=

%7BLF%3ALOOKIN%3D%2522%5CIT%5CTesting%5CLFForms%5CIncident%2520Report%2520Drafts%2522%7D%2520%26%2520%7B%5B%5D%3A%5BRM%2520Incident%2520Report%2520Number%5D%3D%252210860%2522%7D

 

You are not allowed to follow up in this post.

Sign in to reply to this post.