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

Question

Question

Populate the choices available in a dropdown from a datasource

asked on January 20, 2016

I have a form that includes a dropdown field.  I need the choices available to be all the  values from a datasource (sql table).  I have defined the datasource (name="lnra-sql projects (laserfiche)").  My dropdown field is named "Project #" with a variable name of "Project___1"

Is there a way to populate the choices through javascript?

 

 

0 0

Answer

SELECTED ANSWER
replied on January 20, 2016

The field is blank unless an option is chosen. In the Lookup Rules, you can remove the 'When' part of the rule and it will always fill the field.

1 0

Replies

replied on January 20, 2016

Forms can do this natively using the 'Lookup Rules' section of the form editor.

Add the data source in the Forms Administration page, and add your process to the data source. Then you can use the lookup rule to populate the dropdown.

0 0
replied on January 20, 2016

the lookup rules seem to be a comparison.  When "some variable" matches with data source column "some other variable", then fill .....

What would I use in the "When" section?  I dont need to compare it to anything. I just need to display dynamic data from a sql lookup datasource.

 

 

0 0
replied on January 20, 2016

I was thinking that when the user clicks on the drop down arrow, the contents of a datasource would show in the choices section.  By default, I want the field to be blank unless one of the choices is chosen.

 

0 0
replied on January 20, 2016

Thank you..didnt realize i could remove the 'When' part

 

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

Sign in to reply to this post.