Expand my Community achievements bar.

Server-side listbox/dropdown population

Avatar

Former Community Member
What is the best way to change the list of options on listbox/combobox fields at the time a form is rendered on the server in preparation for streaming back to a client? Not the current value of the field, but the list of items from which a user can choose.



We can't set it up at form design time because the options vary depending on the users security settings. And I'd prefer not to attach script code to the control in the form. Does the Form Server API provide a means to alter this information or do I need to pre-process the XDP data in our code and update the list of choices before rendering? Other alternatives?



These are XDP templates created in Designer.



Thanks in advance

Tom
2 Replies

Avatar

Former Community Member
Hi Tom,



You can have the drop down lists populated at render time, but first you will need to setup your form to handle this.



First you have to turn on Dynamic Properties. Under Tools -> Options, select Data Binding, then check "Show Dynamic Properties".



Next you will need to write a schema, or modify your existing one, defining the structure of the data values, and add it as a data connection to your template.



Then select the drop down on the form. On the Object window, under the Binding tab, you can click on "Specify Item Value". This will present a dialog that will allow you to bind the list items.



Mike

www.ensemble.com

Avatar

Former Community Member
Mike, thanks for the information. That seems to work just as described.