Is there a way to script a live look up of the form. There will be static values on the first page and we want that values to be looked up in a table in drop down fields.
Question
Question
Replies
I'm not sure what you mean by "live lookup". Lookups can be performed to populate drop-down lists though.
and furthermore, you can use javascript to invoke lookups if they are not automatically being loaded. But that does not seem like something necessary in this situation.
Can you explain some more about what you want to do.
Yes you have option to tie in to the database in LF forms. 3 easy steps.
Step 1 : Click on the Gear icon on right, add the data source (your sql server)
Step 2: Add your database source
Step 3: On the Form first create all your fields etc. and go to the Lookup Rules and create your sql rules tie in to the
Hi, let me try to explain in a little more detail.
In the picture above there is a table were we manually enter the SRN's, this is a manual process.
In the image below is a table for labour detail. So instead of retyping all the SRN's we want to let the SRN field in the Labour table be a lookup based on what was entered above.
is this possible with some script?
If you intend to use that initial SRN field to run a database lookup to fill corresponding table rows, this is possible out of the box. Here I have manually entered in the employee name field, and a lookup fills in the rows in the table with the each employee's ID and location.
Here is what the lookup looks like:
This works great as long as there are a matching number of rows in the collection and the table. If the rows mismatch some funky stuff happens. I would enter a set number of rows for the collection and table to make sure they match.
If all you wanted to do was map the values from the initial SRN field to the SRN field within the table, this can be done using JavaScript.
yes we want to use javascript, but it only works for one row in the table.
you will need to use javascript to activate that button to add a row, or reproduce that functionality output in javascript, in order to have it add rows. You will then need to modify the javascript to iterate through your new rows and apply the proper value in the order they were input in the earlier table.
Hi Kenneth. Thank you very much. I am not very good with Java Script, can you please post some sample codes for this functionality?
I am not able to devote the time to give you exactly what you need, but I would recommend taking a look at the following links to find what parts you will need:
The answer to this LF Answer will help in figuring out what you will need in order to change the table. You will obviously need to modify it to include the columns you are wanting and to pull information from another table. I hope this helps. The code in the selected answer also helps add in rows via javascript and not require user interaction.