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

Question

Question

Get the current collection number

asked on September 27, 2017

Does anyone know how to get the current iteration of the collection you are in?  Here is the scenario I am trying to accomplish:

I have a form where a user puts in their number, and a lookup rule fills in a collection with however many contracts they have.  The collection is configured to "append sets to the sets populated by a data source or variable.  The procedure works great and I am getting back the data I need.  

However, I want one of the items in the collection to be a Custom HTML activity.  This HTML activity is a hyperlink that the user can click on that will launch WebAccess and run a search for a parameter within its own collection.  I have this working fine on other forms but there is no collection, it is just one HTML link referencing one field on the Form.

Current syntax:   <a class="links" id="a2" onclick="window.open(href='http://server/laserfiche/Browse.aspx?repo=Dev#?search={[Contracts]:[Contract ID]%3D'+document.getElementById('Field13').value+'}%26{LF:Name%3D*, Type%3DF}%26%7BLF%3ALOOKIN%3D%22LegalWF%5C~In%20Process%5CContracts%22%7D'); return false">CLICK TO VIEW DOCUMENTS</a>

Again, this works on a normal field.  However in this case Field13 is in a collection.  So the first one is going to be Field13(0), second is Field 13(1), and so on.  

So what I need is for it to be %3D'+document.getElementById('Field13(X)').value

where X is the current iteration of the collection.

Hopefully that makes sense, does anyone know if that's possible or how I get that current collection number?

 

Thanks,

Chris

0 0

Answer

SELECTED ANSWER
replied on September 27, 2017

Hi Chris,

Instead of getting current collection number, I think you can get that field value directly.

Add a CSS class 'myfield' on that field and update the custom HTML field to:

<a class="links" id="a2" onclick="var value = $(this).closest('div.form-q').find('.myfield input').val();window.open(href='http://server/laserfiche/Browse.aspx?repo=Dev#?search={[Contracts]:[Contract ID]%3D'+value+'}%26{LF:Name%3D*, Type%3DF}%26%7BLF%3ALOOKIN%3D%22LegalWF%5C~In%20Process%5CContracts%22%7D'); return false">CLICK TO VIEW DOCUMENTS</a>

1 0
replied on September 28, 2017

Thanks Rui, this is extremely helpful and works!

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.