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

Question

Question

While using a collection, I cannot get dropdown fields to populate lookups past the first row

asked on June 22, 2021 Show version history

Laserfiche,

The first row of dropdowns works perfectly.  Any other rows have nothing populated.  All these data are in the same view.  This is an on premise setup.

Here is the lookup:

Here’s the form:  Here I am trying to drive it all from “Term” field.  “Term” field is selected, “Section” field is populated based on “Term” field.  “Section” field is selected, other data fields filled in automatically.  This only works for the first row in a collection.  Second, third, etc.. nothing populated in “Section” field.  This is my issue.  I need the second, third, etc… to have the ”Section” field populated so I can drive the rest of the fill in.

Thanks for any help with this.

0 0

Answer

SELECTED ANSWER
replied on June 23, 2021 Show version history

Hi Michael,

From lookup rule #3 in the screenshot, Term field and Section field are in different collection and table. They still follow one-to-one rule inside collection and table, see https://doc.laserfiche.com/laserfiche.documentation/11/administration/en-us/Default.htm#../Subsystems/Forms/Content/Lookup-Rules.htm

Note: Lookup rules used in tables or collections to fill another table or collection perform on only one row/set at a time. One row to one row lookup, not one row to multiple rows. It is not possible to have a single lookup populate multiple rows in a table or collection.

And from the form screenshot, there is only 1 Term. I assume that's why only 1 Section is being filled by lookup. 

 

If Term-Section is one-to-multiple relation, you may re-design form to move Term field outside collection. Alternatively, use a hidden field outside collection that equals to first value of Term inside collection, and then use it in lookup rule #3 condition.

0 0

Replies

replied on June 23, 2021 Show version history

Ziyan Chen,

Thank you for your reply. 

Based on your explanation, here is what I did.

 

1. Created a field on the row of the collection.

2. Set a field rule to always hide.

3. For the newly created column on the collection, I went to the "Advanced" tab.  In the "Advanced" tab "Calculation" section, I set the calculation to "=table.column".  Table and column being the data field for "Term".  This than pulls in the selected "Term" data into the hidden field on the collection.  

4.  Lookups:  When, new_hidden, field is true ( It has something in it. ), use "Term" data and fill "Section" with only active "Sec_Name" for "Term" selected..  Using the hidden field term data this way allows me to populate all potential added rows.  So it is a solution to my issue.

 

There is risk in case someone changes the "Term" selection, so Im gunna have to deal with that, but it works.

Closing this ticket as solved.  Greatly appreciate your answer and any follow-ups.

1 0
replied on April 16, 2022

Fantastic -- This just solved my issue as well.  Thank you for posting.

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

Sign in to reply to this post.