How to create checkbox dynamically in Infopath - InfoPath Dev
in

InfoPath Dev

How to create checkbox dynamically in Infopath

Last post 02-03-2011 02:26 PM by qwerty. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 01-17-2007 09:31 PM

    • kamlesh
    • Not Ranked
    • Joined on 12-22-2006
    • India
    • Posts 10

    How to create checkbox dynamically in Infopath

    Hi,

    I am kamlesh new to infopath 2007, actually i am trying to create checkbox dynamically based on the items presenet in sharepoint custom
    list.

    For eg in Dev_technology custom list if items are dotnet, java, open source then three checkbox should be created dynamically in infopath form.

    Please do the needfull.

    Regards,
    Kamlesh
  • 01-17-2007 10:01 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    Hi Kamlesh,
    I would love to "do the needfull" but I don't have a clucking foo as to what you are talking about. Please provide more details.
    Patrick Halstead
    Project Manager at Qdabra
  • 01-17-2007 10:07 PM In reply to

    • kamlesh
    • Not Ranked
    • Joined on 12-22-2006
    • India
    • Posts 10

    Re: How to create checkbox dynamically in Infopath

    quote:
    Originally posted by Patrick Halstead

    Hi Kamlesh,
    I would love to "do the needfull" but I don't have a clucking foo as to what you are talking about. Please provide more details.



    hi,
    First of all thanks for your concern.
    Basically i am trying to create checkbox control dynamically in infopath form.I am retreiving values from sharepoint custom list.
    My custom list contain three values DotNet, Java and Open Source fine now whats my concern is i want to create three checkbox based on the values store in sharepoint list.

    thanks
    kamlesh











  • 01-17-2007 10:20 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    Hi Kamlesh,
    One way to do this is to use a section around the checkbox. In the InfoPath Designer, add a section to your form. Move the specific checkbox inside the section. Double click on the tab for the section. Choose display and condition. Add a condition based on the data you get from your SharePoint List Adapter. You can hide the section in this way. I'm not sure that is what you want, though.

    If you are trying to simply get data from the SharePoint list adapter and display it, try an expression box next the the checkbox.

    Good luck!
    Patrick Halstead
    Project Manager at Qdabra
  • 01-17-2007 11:44 PM In reply to

    • kamlesh
    • Not Ranked
    • Joined on 12-22-2006
    • India
    • Posts 10

    Re: How to create checkbox dynamically in Infopath

    quote:
    Originally posted by Patrick Halstead

    Hi Kamlesh,
    One way to do this is to use a section around the checkbox. In the InfoPath Designer, add a section to your form. Move the specific checkbox inside the section. Double click on the tab for the section. Choose display and condition. Add a condition based on the data you get from your SharePoint List Adapter. You can hide the section in this way. I'm not sure that is what you want, though.

    If you are trying to simply get data from the SharePoint list adapter and display it, try an expression box next the the checkbox.

    Good luck!





    Hi Patrick,

    I think you still havent understood my question.Actually i am not interested to hide checkbox based on some condition.My concern is to create control dynamically based on records present in secondary datasource.

    If my secondary datasource is bound with sharepoint list [Dev_Technology with four items a, b, c ,d] then four checkbox should be created dynamically in infopath form, if it contain 10 items then 10 instance of checkbox should be created.


    Question is straighforward just want to create checkbox dynamically based on secondary datasource in infopath form.

    I can drag and drop checkbox in infopath form but it will be static one, actually i dont know how many checkbox i have to drag and drop in infopath because it depends on items present in sharepoint list.
    All creation of checkbox should be happen at Runtime.

    I hope you can now understand my Question.

    Regards,
    Kamlesh


    Regards,
    Kamlesh






  • 01-17-2007 11:50 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    Hi Kamlesh,
    If the control is in a section which is displayed based on a condition, I'd say that is dynamic. You can't dynamically change the view at runtime, so you have to do this kind of a trick to make it look dynamic. The view will hold all controls but depending on the form's state some will show and some will hide.

    Ask yourself how long have I been working on InfoPath...

    Patrick Halstead
    Project Manager at Qdabra
  • 10-08-2009 06:53 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    So HOT BE COOL guys! ^_^

  • 01-06-2011 11:02 AM In reply to

    • sr0737
    • Not Ranked
    • Joined on 01-06-2011
    • Posts 5

    Re: How to create checkbox dynamically in Infopath

    Hi Kamlesh, This is Suresh, i am looking for the same thing. i know you came across this issue long back so can you please help me out in implementing this one. Regards, Suresh
  • 01-06-2011 07:36 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    A multi-selection list box is essentially a dynamic list of checkboxes.  Have you tried that approach?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-07-2011 06:48 AM In reply to

    • sr0737
    • Not Ranked
    • Joined on 01-06-2011
    • Posts 5

    Re: How to create checkbox dynamically in Infopath

    Hi Jimmy, you are correct but my requirement is, i need to bind the values form the list to checkboxes or radio buttons. ex:lets assume i am having a sharepoint list consists of 4 rows Title ---------------- Apple Orange Lemon Grape i need to pull the data from this list and i need to present in the form as either Radio buttons or check boxes.if we add new item to the list it should available in the form. and also i need to restrict the user to select only one checkbox or radio button. i guess you understand my requirement. Thanks, Suresh
  • 02-03-2011 01:50 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    Suresh, a possible way to do this would be to have a repeating table filled with buttons that look like radiobuttons and with a field in your datasource ("field1") containing the actual value. When the user clicks on a button, set field1 to the value of the field associated with that row. You could use conditional formatting to manipulate the button-checkboxes to show that they are 'checked.' Clunky, I know, but it would work... what do you think?
  • 02-03-2011 02:26 PM In reply to

    Re: How to create checkbox dynamically in Infopath

    Another way to do it with actual checkboxes/radio buttons:

    In each row of your repeating table, have a radio button, RAD, and an unseen integer field, STATUSFIELD, and another integer field, WATCHER. Outside of your repeating table, an integer field CURRENTHIGH, set to 0.

    When the user clicks a radio button, set current()/STATUSFIELD and CURRENTHIGH to CURRENTHIGH + 1. Make a rule for the field CURRENTHIGH, which will be "set off" when CURRENTHIGH changes. Make the rule set all occurrences of WATCHER to WATCHER + 1. This will change WATCHER. Now make a rule for the field WATCHER (this will happen now, because WATCHER has changed) to set current()/RAD to its "off" value if STATUSFIELD != CURRENTHIGH, meaning that it wasn't the last radio button clicked.

    When you need to get the current value of RAD, calculate RAD[STATUSFIELD = CURRENTHIGH].

    Does this makes sense?

Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.