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

Question

Question

WebLink Search Syntax

asked on March 29, 2013 Show version history

 This works:

 

I did a search in Laserfiche and went to the advanced search and got this:{[Medical Records]:[MPI#]=”282362”}

 

I then translated that search into the following and it works!!

http://localhost/weblink8/Search.aspx?searchcommand=%7B%5BMedical%20Records%5D:%5BMPI%23%5D="282362"%7D

{[Medical Records]:[MPI#]=”282362”}

 

 

I cannot figure out the proper syntax to make this search work in WebLink 8….

 

I did a search in Laserfiche and went to the advanced search and got this: {LF:Name="*282362", Type="F"} 

 

No matter what I try I cannot get it to work…can you advise

 

Fails: http://localhost/WebLink8/search.aspx?searchcommand%3d%28%7bLF%3aName%%3D”22282362”%2c%20Type%3d%22F%227d%29%26dbid%3d0

 

0 0

Answer

APPROVED ANSWER
replied on April 1, 2013 Show version history

It looks like this might be a case of a bit of mistyped syntax. In your second link, there are what appears to be a couple missing %’s and some other characters that seem out of place. I would recommend double checking the entire link: to make this a bit easier, you can always use a freely available URL encoder, such as the one at http://www.w3schools.com/tags/ref_urlencode.asp.

 

In your case, I put your advanced search syntax {LF:Name="*282362", Type="F"} into the URL encoder, and received the following as a result: %7BLF%3AName%3D%22*282362%22%2C+Type%3D%22F%22%7D

 

Combining the encoded search with the rest of the WebLink address, I get the link localhost/WebLink8/Search.aspx?searchcommand=%7BLF%3AName%3D%22*282362%22%2C+Type%3D%22F%22%7D

 

Go ahead and try the above link, and see if that works for you. If you have any further questions, please let us know.

0 0

Replies

replied on February 24, 2015 Show version history

I have code that is trying to create a url for web access (latest version) , without any urlencoding , it works for example ;

http://machineip/laserfiche/index.aspx?db=DevTest#search={[General]:[Document]="1", [Type]="1", [Category]="1"};view=search

That url works perfectly and brings back two documents as expected.
However when i urlencode it with server.urlencode (ASP.NET 2.0), or http.urlencode this same string does not work and instead returns the entire contents of the repository as the search result. Here is the urlencoded url, kindly assist

http://
machineip/laserfiche/index.aspx?db=DevTest%23search%3D%7B%5BGeneral%5D%3A%5BDocument%5D%3D%221%22%2C%20%5BType%5D%3D%221%22%2C%20%5BCategory%5D%3D%221%22%7D%3Bview%3Dsearch

The Web Access server is a windows 2008 server R2,

 

Administrator edit: remove machine IP address

0 0
replied on February 25, 2015 Show version history

The only portion of the URL that needs to be encoded is the search syntax itself, like so:

http://machineip/laserfiche/index.aspx?db=DevTest#search=%7B%5BGeneral%5D%3A%5BDocument%5D%3D%221%22%2C%20%5BType%5D%3D%221%22%2C%20%5BCategory%5D%3D%221%22%7D%3Bview%3Dsearch

Since your second URL encodes information that's part of the URL itself, like the # and the = surrounding "search", the URL can't be correctly interpreted.

As you noted, sometimes the URL will work without the search syntax being encoded, but since this is not always the case, we recommend always encoding the syntax.

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

Sign in to reply to this post.