Adding values to a Listbox programatically - InfoPath Dev
in

InfoPath Dev

Adding values to a Listbox programatically

Last post 01-01-2012 09:35 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-30-2011 01:39 AM

    Adding values to a Listbox programatically

    I have a form with script which uses a SQL statement to determine a list of values. I need to populate a repeating list with these values. I can append them into a text field, but am struggling to add values to a repeating field (Plain list in Infopath 2010). How do you do this using C# code?
  • 01-01-2012 09:35 PM In reply to

    Re: Adding values to a Listbox programatically

    Hi CaroleB and welcome,

    To reduce your maintenance costs down the road, the recommended best practice is to create a common code library that you can use in all of your form templates. We have created one that we sell to help defray the cost of this free forum. It's called qRules. It contains several techniques for copying repeating values from one table or section to another. There are several documents and blog posts on how to do this. If you are interested, please click here: http://www.qdabra.com/en/products/qRules_new.aspx. Click on Resources to the left and then the documentation link to see related topics.

    To "roll your own" common library, you can search the forum for "copy repeating". Over the years there have been numerous posts and downloads showing how to do this in code. You'll have to search for them, but they are out there. If you can't find something in 30 minutes of searching, please email me.

    Best of luck,

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.