Getting Section Properties to Vary by View - InfoPath Dev
in

InfoPath Dev

Getting Section Properties to Vary by View

Last post 04-13-2009 09:09 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-08-2009 10:44 PM

    Getting Section Properties to Vary by View

    I have created a print view that I want users to be able to use to see all content associated with the form.  Some of the content is in optional sections.  On the print view, I've gone into the "section properties" dialog for optional sections and selected "Include the section in the form by default".  This gets the content to appear in the print view, but unfortunately, that same setting is applied to all the views where I don't want that setting (i.e., I want the normal operating view to use the "do not include the section in the form by default" selection).

    Is there a way to trigger these selections based on what view the user is in?  Or a better way to show all the content in the print view?

  • 04-10-2009 08:49 AM In reply to

    Re: Getting Section Properties to Vary by View

    Well, do you want the section to print only if the user has added it? Or do you want it to print regardless...? You see, that setting for the section is data source specific, not control specific. Some settings for controls have to do with the control itself (like formatting, or secondary data sources that provide information for a drop down list). Other settings affect the data source (like rules, validation, default values, and whether or not a node is included in the schema when the form is first created -- the "Include by default" setting). When you set a group to not be included by default, that affects the actual group, not the section control. This is why you are seeing this behavior.

    One way around this would be to build your print view using expression boxes. The expression box can have a formula that uses one of the nodes in your 'optional' section. If the node doesn't exist, the expression box will simply be blank (just as the print view would have held a blank text box for that field). Make sense? Let me know if I haven't been clear enough or if you need more info....

    Hilary Stoupa

  • 04-10-2009 11:07 AM In reply to

    Re: Getting Section Properties to Vary by View

    The print view is for form orientation purposes only, and would never have data.  In print view, I want to show the optional sections expanded (no data); in normal (data entry view), optional sections would be collapsed until needed by user to enter data.  Additional info would be helpful.  Thanks!

  • 04-13-2009 09:09 AM In reply to

    Re: Getting Section Properties to Vary by View

    I would use expression boxes, then. Instead of putting in sections like you are using on the 'fill in' view of the form, use layout tables to keep everything nice and neat, and then you can drag over expression boxes from the controls task pane. In the XPath for each expression box, use the formula editor to select each data field (not the groups, just the fields and or attributes) that you want in the print view. If that field has data in it, the data will display in the print view. Here is some more information from Office Online about expression boxes that you might find helpful.

    Hilary Stoupa

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