How to get checkbox to return database value on query? - InfoPath Dev
in

InfoPath Dev

How to get checkbox to return database value on query?

Last post 12-31-2008 03:38 AM by Shiva. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-29-2008 05:24 AM

    How to get checkbox to return database value on query?

    Have been using InfoPath 2007 for some time now, but cannot figure out how to get the value stored by a checkbox into my SQL database mapped back to the checkbox field.  I can get the checkbox to store data in the field on submit, but if I run a query thru the same form,  the value is not mapped back to the checkbox. What am I missing here?  I can get this to work for option buttons.

     Thanks!

    Filed under:
  • 10-29-2008 06:26 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to get checkbox to return database value on query?

    Hello Welcome to the Forums,

    You have to verify once check box properties as below,

    1. Default state is cleared

    2. Value when cleared : false

    3. Value when checked: true

    Same like above properties check for option button also. Is it both the values are same or not?

  • 12-30-2008 10:02 AM In reply to

    Re: How to get checkbox to return database value on query?

    Hi, what I found was that to get it to work on my form, I had to make the responses map to "y" or "n" and have the field it maps to as a single character, otherwise, while it would allow me to check or uncheck a value, it would not display the value back as a check or uncheck when running a query from the form.   I could not find where this is documented anywhere.

    Thanks again.

  • 12-31-2008 03:38 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to get checkbox to return database value on query?

    Hello,

    Whichever you found solution is correct. We have to set one single character for Boolean variable in database. If you want you can set the value 1 for true and 0 for false.

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