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

Question

Question

Append Choices to Lookup Results Breaks Lookup Matching

asked on October 18, 2025

I have a dropdown field that is configured as Required and has 6 choices configured and the "Append choices to lookup results" option is selected. The same field is part of a Lookup Rule where when another field is populated it populates 7 fields.

With this configuration the field does not populate from the lookup. If I uncheck the "Append choices to lookup results" the lookup matching works again, but I lose the choices being appended.

Is there a workaround for these scenarios? Is this a bug?

Using Forms 12.0.2503.10378

0 0

Replies

replied on October 29, 2025

I have a workaround that appears to be working for me on version 12.0.2503.10378 - at least in the Form Preview, I haven't tested in an actual process.
Javascript for Layout Designer:

/*Option 1 - Manual List of Options:
Rather than using the "Append choices to lookup results"
option to manually add values to the dropdown,
we are using this Javascript. This ensures that the single
value loaded from the lookup is auto-selected.
This function runs when the field is changed by the lookup
and when the form is first loaded.*/
LFForm.onFieldChange(AddDepartmentsToDropdown, {variableName: "department"});
AddDepartmentsToDropdown();
function AddDepartmentsToDropdown() {
  const additionalValues = [
    "Human Resources",
    "Accounting",
    "Contact Center"
    ];
  LFForm.changeFieldOptions( {variableName: "department"}, additionalValues, "add" );
}

/*Option 2 - List of Options from Lookup:
Rather than using two lookups to populate
options in the dropdown (one for the single selected
value and one for the list of possible values).
We are using this Javascript. This ensures that the single
value loaded from the lookup is auto-selected.
This does require two fields, one for each lookup.
The departments_from_lookup field can be hidden from view.
This function runs when the fields are changed by the
lookups and when the form is first loaded.*/
LFForm.onFieldChange(AddDepartmentsToDropdown2, {variableName: "departments_from_lookup"});
LFForm.onFieldChange(AddDepartmentsToDropdown2, {variableName: "department2"});
AddDepartmentsToDropdown2();
function AddDepartmentsToDropdown2() {
  let fullList = LFForm.findFieldsByVariableName("departments_from_lookup")[0].options;
  LFForm.changeFieldOptions( {variableName: "department2"}, fullList, "add" );
}

 

3 0
replied on October 30, 2025

So now I'm testing this in an actual process, and the instance says the value is saved from what I selected on the first submission, but it doesn't show on the field itself on later tasks, and nothing I do with the field settings or Javascript seems to resolve it.  It seems like the changes they made to the code for lookups on dropdowns is buggy or something.

0 0
replied on June 12

Oh great I stumbled into this as well.  Any update as to when it will be fixed. @Chris Cartrett shows the exact scenario that I'm trying to get working.

 

1 0
replied on September 15

Do we know if this has also been fixed in Laserfiche Cloud as of now? Since we are no longer on-prem, we have no options for setting 'LookupAlwaysSelectSingleResult', but are experiencing this same behavior and would prefer not to use Javascript for every drop-down lookup on our form. 

1 0
replied on October 19, 2025

Hi Blake, I can't reproduce the issue based on the general scenario you described. I recommend opening a support ticket and providing the business process details.

0 0
replied on October 22, 2025

I could be mistaken or totally misunderstanding…  But I feel like to have the “Append Choices to Lookup Results” option continue to work properly, you really need to also have the “Assign Values to Choices” option turned on too.

It might be a bug that it doesn’t work well without the values enabled, but I feel like this is something I have encountered as well.

0 0
replied on October 22, 2025

Sorry for the earlier misunderstanding. It's not a bug. It is expected behavior that no choice is automatically selected when the "Append Choices to Lookup Results" option is checked. In this case, the lookup results will only appear as choices, along with the appended ones.

0 0
replied on October 22, 2025

Zanbo, the issue is not that a choice is not automatically selected. The issue is that there are no options populated in the drop down field.

0 0
replied on October 23, 2025

Sorry, I mixed it up with the issue Daniel posted. Actually, they are different issues. In your case, you're saying that after checking "Append choices to lookup results", the dropdown only shows the 6 choices you configured—am I correct? Are the lookup results the same as the 6 choices you set? Duplicate choices will be automatically removed. If they’re not the same, and the lookup results don’t appear at all, then I still suggest opening a ticket for further investigation, as the issue might be related to the database or other configurations.

0 0
replied on October 24, 2025

After doing some additional testing, it appears that what I am trying to do works in the Classic Designer, but not in the Modern Designer.

Classic Designer

Modern Designer

You can see from the gifs that I created two forms, one using Classic the other using Modern. Each have the same two fields. The RF Contracting Entity fields have choices assigned to them and have the Append choices to lookup results selected.

The lookup rules are also configured the same. With the Classic Form, it selects the RF Contracting Entity value from the lookup based on the Vendor Name and populates the choices. With the Modern Form it does not select the RF Contracting Entity value from the lookup, but populates the choices.

0 0
replied on October 26, 2025

I can't see the text clearly as the resolution of gifs is too low. After populating the choices, are the dropdown lists in the Classic Form and Modern Form the same? Is the only difference that the RF Contracting Entity value from lookup is not selected?

0 0
replied on October 26, 2025

Sorry for the resolution. Yes, in the classic designer the option in the drop-down field is selected whereas in the Modern designer the option is not. Both populate the appended choices.

0 0
replied on October 26, 2025

When "Append choices to lookup results" is checked, the lookup result value is displayed alongside existing choices in the dropdown list, with duplicates removed, but it is not auto-selected. I've checked and confirmed that this is the expected behavior in Forms 12 Modern Form, although it differs from that of the Classic Form.
As an alternative, you can put the dropdown into collection/table, and select the "as new sets/rows" in lookup rules, then the lookup result value will be auto-selected.
Sorry for any confusion caused.

0 0
replied on October 28, 2025

Is there a reason that behavior was changed?

0 0
replied on October 28, 2025

The behavior was changed in bug #538516 on Cloud and applied to Self-hosted Modern Form. After that (starting with Forms 12), the lookup result will be selected only if there is one result at the end (including appended choices).

0 0
replied on October 29, 2025

What was the bug that was trying to be fixed? Having a dropdown field that has set available options, either set at the field level itself or populated from a database, and then having an option selected for that dropdown based on a database lookup, while still showing the other available options is a pretty standard practice for web forms in general. I'm just trying to understand what the reasoning was behind removing it, especially if it was because of a bug.

2 0
replied on October 29, 2025

The bug was just about the lookup rules behavior change we discussed. It seems the team ultimately decided to update the behavior. I’m not certain about the reasoning behind this decision, but I’ve shared your feedback with the team.

1 0
replied on October 30, 2025

The behavior was changed in bug #538516 on Cloud and applied to Self-hosted Modern Form. After that (starting with Forms 12), the lookup result will be selected only if there is one result at the end (including appended choices).

It looks to me like it is also undoing the selection from a prior task submission.

0 0
replied on October 30, 2025

Found a work around:
Add an extra single line field to pull the lookup (keep hidden) and use JavaScript to move the result to the drop-down field. You can still see the default selections in the drop-down and change the answer.

Here is the script: 

//Set Drop Down Field with lookup field value//

LFForm.onLookupDone(function () {
    const valueArray = LFForm.getFieldValues({ fieldId: 4 });
    const valueToSet = Array.isArray(valueArray) ? valueArray.join(' ') : valueArray;

    if (valueToSet && valueToSet.trim() !== '') {
        LFForm.setFieldValues({ fieldId: 3 }, valueToSet);
    }
}, { lookupRuleId: 1 });

 

Change the Field IDs based on the hidden field, dropdown field and your lookup rule.

0 0
replied on April 16 • Show version history

It is still ultra unintuitive behavior and as far as i am concerned is a bug and needs to get resolved.

I noticed it was excluded from today's April 2026 release:


@████████, I don't see where anyone has mentioned it, but here is a picture guide to how this is REALLY broken and needs to get fixed. 

Scenario1: 'Append choices' unselected:

The value from the lookup is "Yes"
End result:

What if the user wants to change the value? They cannot? This is more version 12 wonky behavior. Not ok. 

Scenario 2: 'Append choices' is selected


Lookup value = "Yes"
result:

unselected!
Both values appear for the user to select:


Does that help clarify how this is a bug? Yes we can send the lookup value to a hidden field and JavaScript it in, but that is a workaround. 

What questions do you have or what else do you need to see to understand this is less functionality in version 12 than 11?

I need the lookup value to be selected AND the other options from the dropdown available for the user to select. That used to work. Now it does not. Is this now the way it is? That does not make sense. 

3 0
replied on April 16

I have the same problem in LFCloud.

If I don't append to choices the previous selection from lookup db is populated in focus the dropdown box but no choices listed. True! 

If I check append choices, the lookup value appears two spaces down the list, on top of the Selection choices and blank in focus in the box.  I advised my clients to click on dropdown box.  Danger if you use the form to update at the box is null!

 

Yes, its not working for your logic.  Its your view of the role of the lookup. The lookup for the dropbox its updating choices!  Not the truth of previous selection or values.  The Dropbox is an input control that drives consistency to terms and enforcing corporate taxonomies.  You should populate previous choice in a separate textbox.  

 

I develop forms for convenient input - Radio Buttons, DropDown etc - Initial Form.  The review form has different controls as they quicker to populate and easier to read. I tried many times to retrieve data from Tables of previous selections of Radio Controls on forms but I could get the Radio Controls to behave on review form. One example of horses for courses!  

Happy to discuss.

0 0
replied on April 16

This behavior change in the Forms 12 Modern Form was made to keep it consistent with Cloud. I’ve filed bug #654780 to address this. A possible solution is to provide an additional option that allows users to choose whether the lookup value will be selected automatically.

2 0
replied on April 17 • Show version history

Here is the JavaScript i had to use so keep the same functionality as v11. Hope it helps others. Set 'sourceField' as your text field and 'targetField' as your dropdown. This block of code has 3 dropdown I am populating. 

/*add values to dropdown fields*/
(function () {
    var fieldMaps = [
        { sourceFieldId: 213, targetFieldId: 206 },
        { sourceFieldId: 214, targetFieldId: 207 },
        { sourceFieldId: 215, targetFieldId: 208 }
    ];

    function normalizeValue(val) {
        if (Array.isArray(val)) {
            val = val.length ? val[0] : "";
        }
        if (val === null || val === undefined) {
            return "";
        }
        return String(val).trim();
    }

    function syncPair(map) {
        var sourceRaw = LFForm.getFieldValues({ fieldId: map.sourceFieldId });
        var sourceVal = normalizeValue(sourceRaw);

        if (!sourceVal) return;

        LFForm.setFieldValues({ fieldId: map.targetFieldId }, sourceVal);
    }

    fieldMaps.forEach(function (map) {
        LFForm.onFieldChange(function () {
            setTimeout(function () {
                syncPair(map);
            }, 500);
        }, { fieldId: map.sourceFieldId });
    });
})();

 

0 0
replied on October 22, 2025

Sorry for the earlier misunderstanding. It's not a bug. It is expected behavior that no choice is automatically selected when the "Append Choices to Lookup Results" option is checked. In this case, the lookup results will only appear as choices, along with the appended ones.

You are not allowed to follow up in this post.

Sign in to reply to this post.