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

Question

Question

How to populate drop down menu with results from an sql query

asked on July 30, 2019

Hi,

 

I'm new to Laserfiche and looking for assistance with this.

I have two drop-down menus on the form.  The first one lists the available buildings while the second one allows the user to choose the room within the building.  I currently have the buildings and associated room in an SQL table.

Once the user selects a specific building from the first drop-down menu, I want to do an sql query to find all rooms within the building and list those as options provided by the second drop down list.

0 0

Answer

SELECTED ANSWER
replied on July 30, 2019

To do this, you would set up two lookup rules from the Lookups tab in the form designer.

The first should always run, so remove the condition part beginning with When by clicking the x, and set the Fill line to Fill Available Buildings with data source value Available Buildings DB column. This will show all the available buildings in the first dropdown list. 

The second will read, When Available Buildings matches with data source column Available buildings DB column, Fill Room with Rooms available in the building. This will fill the second dropdown based on the options that match the first selection. Any time the first selection gets updated, the second dropdown will be updated as well. 

2 0

Replies

replied on July 30, 2019

Jared,

Thank you!!!!  I can't believe the implementation was that easy!

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

Sign in to reply to this post.