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

Question

Question

HTML search link not showing field value

asked on November 27, 2018 Show version history

I am developing a small proof of concept and am a little stumped on this one.  I have an HTML field on a Form.  All it contains is an href to another field on the Form (the "test" field). 

The "test" field is a hidden field on the the Form that contains the search URL to go find the document in Laserfiche.

The full URL is as follows:  

http://localhost/laserfiche/index.aspx?db=Repository#view=search;search={[Purchase Order]:[Purchase Order Number]="818661"} & {LF:LOOKIN="repository\~In Process\~Open Purchase Orders"}

This works fine if I paste it into a browser.  

However, when clicking the HTML link it seems to just go back to the page.  

When hovering over the href in the form I see the following:

This is a starting form and that is the URL of the starting Form.  Why would the HTML link show the URL for the form I am on and not the URL I have in my Test field?

 

Thanks,

Chris

 

Edit - I also simply hard coded google into the link:

 

When hovering over this link it shows the following:

It is like it is auto appending the forms URL ahead of the normal link and I am not sure why.

0 0

Replies

replied on November 27, 2018

Are you encoding that text at all? The embedded quotes will break your html. If you view source on the page you should get an idea of what is going on.

0 0
replied on November 27, 2018

I tried encoding the whole thing and it still didn't work.  But as above I just tried to put the URL in for Google.

So this is now all the HTML is:

<a href="www.google.com" target="_blank">Click here</a> to view the PO.

Inspecting the page gets me:

Clicking the link goes to:

Again it is like Forms is trying to append the URL I am currently on before the URL in the HTML link.   In this case I started it from the Process Diagram so it throws the /new in there.

If I go straight to the published form URL:  localhost/forms/invverify

and then click the link it takes me here.

Again it seems to be appending the current URL in there and it's extremely strange.

0 0
replied on November 27, 2018

Ok, well doing some more looking and testing I think I have it figured out.  Posting in case others want to do it:

 

With the google link apparently you have to http:// as well as the www.  Once I put in the http it worked as expected.

Here is what I think is going on for the real issue

As for what I am trying to do, I want an HTML link that runs a WebAccess Search.  

As I have done this before in many processes this is apparently the first time I have done it on a Starting Form.  Most of the time the form the user is at is in the middle of a process.  By being in the process, the field is set by a Set Business Process.  However, being a starting form the {/dataset/test} is not set yet.  Even though it shows on the Form.  I have tried it being a default value, I have tried setting the field in the URL, I have tried changing it on the fly, the dataset/test variable is not set until submit.

To test, I invoked the process and passed forward that URL through the invoke.  This time the /dataset was populated and it worked.

So the normal way of using those variables does not work on starting forms.

Fix:

Gave the HTML href and ID of 'polink'.  Q31 is the field that holds the URL I want.  In a document ready function 

var invnum = $('#q31 input').val();
 var polink = document.getElementById("posearch");
  polink.setAttribute("href", invnum);

Basically I am assigning the URL found in q31 to the href attribute.

This seems to work.  Again, as this is a starting form (embedded in WebAccess actually and accessed using custom tabs) it seems this was the only way to do it.

0 0
replied on January 6, 2021

Hi!

 

I am running into this same issue. Is changing the q31 to my variable, #q231, all that I need to do? 

Thanks! 

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

Sign in to reply to this post.