Clearing cascading dropdowns in a repeating table - InfoPath Dev
in

InfoPath Dev

Clearing cascading dropdowns in a repeating table

Last post 04-17-2006 07:03 PM by Matt Faus. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-17-2006 09:19 AM

    Clearing cascading dropdowns in a repeating table

    I have a form with one repeating table with 2 cascading dropdowns that I am trying to complete. I followed the instructions in the great tutorial http://infopathdev.com/howto/tutorials/default.aspx?i=075c4e8e56db4fa5bd63615b712c0d91), but I'm stuck in one place.

    I'm trying to allow the user to create a list of courses that they want to take, choosing from a course list maintained on a SharePoint List.

    My form has a repeating table with two DDL's data connected to a simple SharePoint list, with the left most DDL (Category) filtering what appears in my second column (Title).

    I was able to make the unique filtering of Category work (thanks again for the great tutorials)--(my unique filter looks like this: not(. = ../preceding::dfs:SAP_Training_Courses/@Category).

    THE PROBLEM
    However my Title DDL keeps displaying data from previous selections as I insert rows on my repeating table. I'm guessing this has something to do with my use of the current() XPath function, but can't for the life of me figure out just what the issue is. I created a rule on the Category column that supposedly clears the Title DDL, but again, I'm doing something wrong.
  • 04-17-2006 03:09 PM In reply to

    Re: Clearing cascading dropdowns in a repeating table

    I think I know what your problem is, but let me know if I'm misunderstanding it.

    Say you have a Math category with Calculus, Discrete Mathematics, and Set Theory as classes. If the user selects Calculus in the first row you do not want to display it in any of the subsequent rows, even if they select Math as the category in other rows. The tutorial does not actually describe how to do this, but you can use the following XPath expression to accomplish this:

    not(. = current()/preceding-sibling::dfs:SAP_Training_Courses/@Category) and
    not(. = current()/following-sibling::dfs:SAP_Training_Courses/@Category)

    This should work, but if it doesn't, try subsituting "@Category" instead of using the ".".

    Hope this helps!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 04-17-2006 03:48 PM In reply to

    Re: Clearing cascading dropdowns in a repeating table

    Thanks for the response Matt. Unfortunately, that's not my issue (but it's a feature that I can use!). In fact, I tried the expression (twice--using "." and "@Category") and instead of filtering, I got ALL course titles, regardless of category.

    Let me try to explain my initial problem better: I have a Math category with Calculus, Discrete Mathematics, and Set Theory as classes. In the first row of the table, the user selects Math as the category, and then Calculus as the course title. In the subsequent row, if the user selects a new category of English, they see all the English course titles like Grammer, Literature, AS WELL AS all the Math course titles.
  • 04-17-2006 05:06 PM In reply to

    Re: Clearing cascading dropdowns in a repeating table

    Matt, I went back and analyzed the tutorial and combed through it one more time, and I've discovered that I don't know how to read carefully.

    Problem solved.
  • 04-17-2006 07:03 PM In reply to

    Re: Clearing cascading dropdowns in a repeating table

    Glad you got it working :)
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.