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

Question

Question

Is there a dropdown loading status for lookup rules to SQL

asked on December 23, 2015 Show version history

I have a form to modify pre-existing data employee data in an SQL table. Because LF Forms does not allow the values part of a dropdown to be loaded from SQL, and only allowing the list items to be loaded, I have to maintain the selected list items ID in another field. The form lookup rules loads the dropdown first, then the loads the SQL stored ID for the current selected list item, the ID is then used to get the name for the list item, when located, the name is used to select the matching list item in the dropdown.

This works 98% of the time, however 2% of the time the dropdown is not fully loaded, and the match fails because the list item is not available in the dropdown “yet!”. 

Is there some method of determining the status of a dropdown load from SQL, “Is the dropdown Load Complete”.  

Job Title Dropdown: Office Manager

val_title: Office Manager
val_id_title: 27

Content for dropdown is:

Desktop Support
Administrative Assistant
Office Manager
Seasonal
IT Director
Lobby Greater
Supervisor

SQL Table Data:

id, name, department, id_type
4, Desktop Support, 12, 24
3, Administrative Assistant, 22, 24
27, Office Manager, 22, 24
15, Seasonal, 34, 24
35, IT Director, 12, 24
66, Lobby Greater, 34, 24
12, Supervisor, 22, 24
 

0 0

Replies

replied on December 24, 2015

Hi there,

Which Forms version are you using? Can you show me a screenshot of your Lookup Rules setting?

0 0
replied on December 28, 2015

Laserfiche Forms: 9.2.1.1069

This is an employee update form.

Gen table has branch, department, and title names for dropdowns, keyed by an id_type. branch = 2, department = 3, and title = 24

I load the dropdowns with table data first. When employee data is loaded, I get the name values "val_" from the gen table by matching the employee stored id's for each; branch, department, and title. The entries marked as "new_" are there because; "since I don't have complete control of the lookups, using callbacks and logic" the lookup rules function creates a lookup loop; if I try to update the original field loaded from SQL. To correct this I have a second set of field for update/change. The employee data is loaded last, in hopes the dropdowns will be fully loaded.

 I am also supplying Javascript, some has helped "setTimeout", some has not "LF.lookup.startingCount". I don't really want to set a static timeout, unless I have to.

Are there controls that I have not found?

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

Sign in to reply to this post.