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

Question

Question

Laserfiche Forms- How to tie a field to a database table column

asked on July 24, 2018

Is there a way to set up a field on Laserfiche Forms, so that as you are typing a name on that field, names from the database table column that is configured in the lookup rule come up? For example, I have a field for users to enter their supervisor/manager names so that the form routes to them for approval after submitting the form. I want the users to be able to start typing a name and names start appearing so that they can click on the name. This would act as an error proof method to ensure the right name is selected. The exact name needs to be selected so that it can route appropriately. 

 

Thanks.

0 0

Replies

replied on July 24, 2018 Show version history

Yes, you can accomplish this as follows

  • Use a Single Line field
  • Configure the lookup rule to populate the field with the desired column
  • Remove the Condition so it pulls all results from the table
  • Make sure "Add as New Rows" is not checked.

 

However, this will not prevent users from entering other values so you would need a secondary process to validate the data against the table. For example, you could have another lookup that pulls values based on the first field and make that dependent field required/read-only.

4 0
replied on July 24, 2018

Thanks for the quick reply Jason.

 

It looks like what did it was removing the condition from the lookup rule as you stated. 

0 0
replied on July 24, 2018

Use dropdowns, but apply select2 so they are searchable. Here is some sample code.

 

$('head').append('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" type="text/css" />');
$(document).ready(function () {
    $('.table.cf-table-block').on('click', 'a.cf-table-add-row', ApplySelect2);
    ApplySelect2();
});

function ApplySelect2() {
    $.getScript('https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js', function () {
        $('.employee select').select2({
            placeholder: "Select an employee",
            width: "450px"

        });

    });
}

 

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

Sign in to reply to this post.