Filter Repeating List/Dropdown - View All? - InfoPath Dev
in

InfoPath Dev

Filter Repeating List/Dropdown - View All?

Last post 01-11-2007 10:02 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-10-2007 11:07 AM

    • pbleic
    • Not Ranked
    • Joined on 01-10-2007
    • Posts 1

    Filter Repeating List/Dropdown - View All?

    I must be missing something here. Although I am a newbie I have learned a lot of the ins and outs of basic Infopath, but there is one issue that has me stumped. First the (long) setup:

    I have a SQL server table of Company each of which has a Status. The choices for Status is a separate table of standard choices with a PK of idStatus. Company has a column, idStatus (an integer)which is the FK from the Status table.

    I want to make a repeating Infopath table of Company filtered by Status. The "Status" box in the table is from idStatus and is an integer field. So, I make the Status box an expression box and have it display the Status from a secondary Office datasource (based on idStatus = idStatus). I made a dropdown list for filtering based on Status. I populate the values/Status types either manually or by looking up on the secondary Status datasource. I put a rule in to the dropdown to do a database lookup after choice.

    When I view the form, I choose a Status from the drop down and voila - only companies with that status are shown, and they each have the right status listed.

    Here is my problem:

    1. I want to "Show All" and "Show Blanks"

    I found, under filter for repeating tables, a help file that addresses exactly this: Example: Include "Show All" and "Show Blanks" options in a list box filter

    This help file doesn't work in this setting. My dropdown, bound to idStatus won't let me enter words as values. I can't find the name of the dropdown list to address in the filter.

    IF Status was simply a text box, I think I could get it to work. But when it is from a separate, linked SQL table I am having trouble finding a way to "Show All."

    Can anyone help?

  • 01-11-2007 10:02 AM In reply to

    Re: Filter Repeating List/Dropdown - View All?

    Hi pbelic and welcome to the forums!

    For the Show All option you could use the default blank value of the drop-down to show the correct rows. This would only change your conditional logic slightly - you'd now have 2 conditions instead of one as shown below.

    Hide Control WHEN:
    this.Status = StatusDropDown AND
    StatusDropDown is not blank

    I'm not sure of the best way to do Show Blanks - maybe a button that sets the value of a secondary DOM node, or a checkbox that displays them. Another idea is using Greg's HowTo on adding drop-down values with code, but you probably don't want to add code for this if your solution currently does not have any.

    http://infopathdev.com/howto/tutorials/default.aspx?s=Lists
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.