Accessing checkbox values - InfoPath Dev
in

InfoPath Dev

Accessing checkbox values

Last post 07-20-2009 10:38 PM by warrtalon. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 07-19-2009 12:30 PM

    Accessing checkbox values

    I have a infopath form with lots of checkboxes. I have a requirment to not show the checkboxes that are not checked during the print.

    I created two different views (view1, view2) for the same and onclick of Print button in view1 i switch to the another view , i have put Me.Print() code there on the click of that button.

    I tried using section and grouping those checkboxes withing that and giving the condition to show/hide section based on the group checkbox value.But this is not helping me to solve the problem, as i need to show/hide individual checkbox instead of the whole group.

    My problem is how to access the checkbox values of view1 and hide that in view2.

    Any help would be appreciated.

    Filed under:
  • 07-19-2009 12:33 PM In reply to

    Re: Accessing checkbox values

    Doesn't each check box have a value?  Place conditional formatting on each check box.

  • 07-19-2009 12:47 PM In reply to

    Re: Accessing checkbox values

    Thanks for quick reply!

    Each checkbox has the value as True/False.

    But in conditional formatting i see 'Hide this control' as disable.

  • 07-19-2009 12:51 PM In reply to

    Re: Accessing checkbox values

    Pankaj Sharma:
    But in conditional formatting i see 'Hide this control' as disable.

    What?  You see "Hide this control" as disable?  What do you mean?  You should have the option of hiding the control OR disabling, but I thought you wanted to hide, right?  What's the problem?

  • 07-19-2009 01:01 PM In reply to

    Re: Accessing checkbox values

    Yes.I see 'Hide this control' as disable, when i right click>Conditional formatting>Add on that checkbox control.

    I want to hide the same control (e.g. name field101)  in View2 based on its value (check/uncheck) in view1.

  • 07-19-2009 01:10 PM In reply to

    Re: Accessing checkbox values

    Oh, you mean you see that "Hide this control" _is_ disabled.  I didn't understand when you said "as disable."  Yes, I checked, and I don't know why it disables the hide ability on a check box.  I know that you can put the check box in a section and place conditional formatting on the section that hides it.  Tedious to do each one that way, but it's all I can think of, since I'm not sure why it's disabled on a check box.

  • 07-19-2009 08:54 PM In reply to

    Re: Accessing checkbox values

     Placing checkboxes in their own sections and hiding the sections seems to be the typical way of hiding checkboxes.  This question has come up several times before and that has always been the resolution as far as I can remember.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-20-2009 12:24 PM In reply to

    Re: Accessing checkbox values

    Isn't any other way through coding in Visual studio possible?

     

     

     

  • 07-20-2009 05:59 PM In reply to

    Re: Accessing checkbox values

     There is no way to access or modify InfoPath controls' display properties in code.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-20-2009 10:31 PM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: Accessing checkbox values

    Hello Sharma,

    I am relatively new to InfoPath and InfoPathdev.com.

    I have been grogressing and developing InfoPath forms, and associated rules and conditions.

    I find alternate printviews helpful.  I used to (until today) think that a view was a separate form. Certainly as you can redesign the print view layout.
    And the input view is the main form. What I thought was, that an InfoPath file, was a file, and within it, you had a form and print views.
    The views I thought were extra forms. Because you can still add extra input controls to them.

    Having two extra print views,, one showing all statements where their corresponding check boxes are checked.
    And I guess, the other form, if needed, has check box statements, where the check boxes are unchecked.

    Now each extra view will almost be a copy of the original form, BUT, not have any of the check boxes appearing. 
    On each view a section is created for each check box statement, and the section can be hidden, or shown, depending on the check box value.

    Is that of any help to you.

    And thank you again Wartalon for you grammatical corrections. Hopefully the above is now correct.

     Ian Dawson

  • 07-20-2009 10:38 PM In reply to

    Re: Accessing checkbox values

    Not two forms, but two views in one form, and we've twice mentioned putting the check boxes in sections that then have conditional formatting to hide them according to their values.  I'm not sure if that's what you're repeating or if you're saying something else.  Your explanation is unclear, and I'm not sure what the alternative printview sentence was referencing.  To clarify, there will not be any extra forms - just views in the same form.

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