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

Discussion

Discussion

Repository URL's in Forms Collection (LF Cloud)

posted on August 4, 2023

Hello, I'm having an issue with my custom HTML Repository URL's populating the right entry id values within a Forms collection.

I have a collection on my form that represents check documents in the repository and I would like to have a button/URL that users can click to be taken directly to that document in the repository.

If my collection is completely populated by a data lookup, then the entry ID variable is empty until the form is submitted and therefore the repository URL doesn't work.

If I have workflow pass the entry ID values up to the forms process as a multi-value and assign the form as a task then the collection looks correct by having a row for each entry ID however the Entry ID variable in my repository URL is pulling ALL values of the variable separated by a semicolon. 

So for example, if my collection has 4 rows and each row has a single entry ID....the repository URL for each row would be: https://app.laserfiche.com/********id=94;98;104;108

Is there a way to format the variable use a certain value based off the row number (similar to using the INDEX function for field calculations)?

Or is there a better way to do this possibly?

0 0
replied on August 4, 2023

If you have custom HTML using a variable, try using the ROW() qualifier like this
 

<a href="https://app.laserfiche.com/. . ./{/dataset/Entry_Table/Entry_ID_Col[ROW()]}" target="_blank">Entry ID</a>

 

0 0
replied on August 5, 2023

I tried this but the variable won't populate a value and just inserts the variable as text.  I'm on LF Cloud by the was using the newer form designer so that might be a factor.

0 0
replied on August 4, 2023

I have something similar to this.

Here is the code:

var index;
$(document).ready(function(){
  $(".myTable").on('click', '.viewDoc', openDoc);
});

function openDoc() {
  index = $(this).closest("div.form-q").index() + 1;
  var docID = $('[name="Field6(' + index + ')"]').val();
  var link="http://servername/laserfiche/Browse.aspx?repo=reponame#?id=" + docID;
  window.open(link);



}

This is what my table looks like:


Field6 being the field containing the entry ID being populated via lookup

.myTable is the class assigned to the collection

 

Hope this helps.

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

Sign in to reply to this post.