Repeating Cascade List Problem - InfoPath Dev
in

InfoPath Dev

Repeating Cascade List Problem

Last post 07-12-2006 04:04 PM by SamDahl. 21 replies.
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts: Previous Next
  • 06-05-2006 04:46 AM

    Repeating Cascade List Problem



    I'm following the howto at:
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=075c4e8e56db4fa5bd63615b712c0d91

    When I get to the point of setting the filter on the first drop down box, the drop down box is blank. Removing the filter restores the data.

    The data I have in hte xpath box for this field is as follows:

    /dataroot/family_list[family = current()/my:family]

    Anyone know why this doesnt work???


  • 06-05-2006 11:12 AM In reply to

    Re: Repeating Cascade List Problem

    Hi Taffman,

    Make sure you are entering the value using “Insert Field or Group” and selecting the value from your secondary data source. Do not enter it by typing it in.

    Hope this helps.
    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 06-06-2006 04:17 AM In reply to

    Re: Repeating Cascade List Problem

    Many thanks Stephanie, I've managed to get this working now.

    The only problem I have now is that I cannot get a uniqueness filter to work at all. I've sucesfully re-created the Howto exercise inhttp://www.infopathdev.com/howto/tutorials/default.aspx?i=075c4e8e56db4fa5bd63615b712c0d91 but when I try to apply what I've learned here in my form it doesnt work.
    I'm beginning to suspect the source xml data file, can anyone confirm that this might be the source of my problems? I created this file by exporting from Ms Access as XML.
  • 06-06-2006 04:36 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-28-2006
    • Australia
    • Posts 44

    Re: Repeating Cascade List Problem

    If the source xml file isn't structured as you expect it would cause your problem.

    Could you post the structure and filter you are using?
  • 06-07-2006 03:26 AM In reply to

    Re: Repeating Cascade List Problem

    Hey Taffman,
    Sorry I don't have an answer but Iam having the same problem as you.
    If you ever find an answer................. I'll do the same for you!
    Cheers
  • 06-07-2006 07:21 AM In reply to

    Re: Repeating Cascade List Problem

    quote:
    Originally posted by SamDahl

    If the source xml file isn't structured as you expect it would cause your problem.

    Could you post the structure and filter you are using?



    Ok here goes:

      <?xml version="1.0" encoding="UTF-8" ?> 
    - <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="msc_cpe_kit_list.xsd" generated="2006-06-06T16:26:46">
    - <msc_cpe_kit_list>
    <cpe_vendor>CISCO</cpe_vendor>
    <cpe_family>1841</cpe_family>
    <country_kit>EU</country_kit>
    <cpe_code>WS1-H-C1841-PF-EA</cpe_code>
    <cpe_description>CISCO1841 + 64kbps - 1984kbps - V35 + EU AC Power cord</cpe_description>
    <display>WS1-H-C1841-PF-EA - CISCO1841 + 64kbps - 1984kbps - V35 + EU AC Power cord</display>
    <list_price>2495</list_price>
    </msc_cpe_kit_list>
    - <msc_cpe_kit_list>
    <cpe_vendor>CISCO</cpe_vendor>
    <cpe_family>1841</cpe_family>
    <country_kit>EU</country_kit>
    <cpe_code>WS2-H-C1841-PF-EA</cpe_code>
    <cpe_description>CISCO1841 + 64kbps - 1984kbps + ISDN BRI - V35 + EU AC Power cord</cpe_description>
    <display>WS2-H-C1841-PF-EA - CISCO1841 + 64kbps - 1984kbps + ISDN BRI - V35 + EU AC Power cord</display>
    <list_price>2995</list_price>
    </msc_cpe_kit_list>
    - <msc_cpe_kit_list>
    <cpe_vendor>CISCO</cpe_vendor>
    <cpe_family>1841</cpe_family>
    <country_kit>EU</country_kit>
    <cpe_code>WS3-H-C1841-PF-EA</cpe_code>
    <cpe_description>CISCO+ E1 + EU AC Power cord</cpe_description>
    <display>WS3-H-C1841-PF-EA - CISCO+ E1 + EU AC Power cord</display>
    <list_price>3395</list_price>
    </msc_cpe_kit_list>
    </dataroot>


    If this XML file isnt valid, then I appreciate any tips on how to create one as this was a direct XML export from MsAccess.

    also tried uploading this table to MsSQL database, same results?
  • 06-07-2006 09:49 PM In reply to

    Re: Repeating Cascade List Problem

    I'm not sure if this applies to you are not because I have never heard of a "uniqueness filter" but thats not saying much because I'm an infopath super newbie. I had a problem with getting my current filter to work properly untill I entered it in as (using yours as an example) /dataroot/family_list[family = current()/../my:family]. I had to enter the current function as "current()/../" and then it worked like a champ. I dont know if this applies to your situation but I thought I'd mention it in case it did.
  • 06-07-2006 11:34 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-28-2006
    • Australia
    • Posts 44

    Re: Repeating Cascade List Problem

    Ok, the xml you've posted is a hierarchical datasource where the tutorial you've posted uses a flat xml datasource.

    If you need help adapting your uniqueness filter post what you've got and I'll take a look at it.
  • 06-08-2006 01:08 AM In reply to

    Re: Repeating Cascade List Problem

    Hello Taffman,
    Did you try another How To which is based on Hierarchical datasource. One difference between the xml used in How To based on Hierarchical data source and the xml which you sent is that he set values in attributes. The link to How To ishttp://www.infopathdev.com/howto/tutorials/default.aspx?i=9f6fda3a14c14ac4924cf0a382928432

    Hope this helps!
  • 06-08-2006 03:55 AM In reply to

    Re: Repeating Cascade List Problem

    quote:
    Originally posted by shailaja

    Hello Taffman,
    Did you try another How To which is based on Hierarchical datasource. One difference between the xml used in How To based on Hierarchical data source and the xml which you sent is that he set values in attributes. The link to How To ishttp://www.infopathdev.com/howto/tutorials/default.aspx?i=9f6fda3a14c14ac4924cf0a382928432

    Hope this helps!




    Many thanks for this, from what I'm able to determine the only difference in this HowTo is that the Xpath statement for the datasource adds /value. My problem is that my Hierarchical datasource shown above does not display a Valuenode.

    The following image show what my datasource looks like:
  • 06-08-2006 04:14 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-28-2006
    • Australia
    • Posts 44

    Re: Repeating Cascade List Problem

    You should be able to follow the Hierarchical tutorial. A uniqueness filter is not necessary. You don't have a /value attribute in your datasource, when the tutorial asks to select msc_kit_list/cpe_family/value just choose msc_kit_list/cpe_family. Make sure to differentiate between nodes in your secondary datasource and fields in your main datasource (current()/my:Year for example refers to the first field in your repeating table) and you should be home dry.

    Post back if you need any further help, goodluck!
  • 06-09-2006 07:02 AM In reply to

    Re: Repeating Cascade List Problem

    Many thanks for taking the time and trouble to help. I think I do need a uniqueness filter irrespective of wether I use flat or hierarchial xml files because I still see multiple values in the first column.
  • 06-12-2006 05:08 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-28-2006
    • Australia
    • Posts 44

    Re: Repeating Cascade List Problem

    *embarrassed* ...made my test values different >.<
    My apologies.

    This'll work:
    not(. = ../preceding-sibling::msc_cpe_kit_list/cpe_vendor)

    Double-click the drop-down list box.
    Click the Select XPath button to the right of the Entries text box. Select the field in the tree that you are using in this combo box (eg. msc_cpe_kit_list/cpe_vendor).
    Click Filter Data, and then click Add.
    In the first drop down of the Specify Filter Conditions dialog box select The Expression and input the above filter.

    You should only have to change the "msc_cpe_kit_list/cpe_vendor" bits to suit other fields you wish to filter.

  • 06-13-2006 01:31 AM In reply to

    Re: Repeating Cascade List Problem

    Nope this doesnt work either, still see duplicate values?
  • 06-13-2006 04:59 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-28-2006
    • Australia
    • Posts 44

    Re: Repeating Cascade List Problem

    Hmm, it worked in mine...
    What I've done:

    1. copied the xml you listed here and used it as a 2DS.

    2. followed the hierarchical tutorial, my main datasource looks like this:
    -myFields
    --Group1
    ---RepeatingGroup1
    ----Field1
    ----Field2
    ----Field3

    3. doubleclicked each combobox and using "Look Up Values In A Data Connection..." I've bound the first three items from the xml. i.e:
    Field1 is bound to /dataroot/msc_cpe_kit_list/cpe_vendor
    Field2 is bound to /dataroot/msc_cpe_kit_list/cpe_family
    Field3 is bound to /dataroot/msc_cpe_kit_list/country_kit

    4. added filter to Field2 based on the value of Field1, likewise for Field3 based on Field2. (I won't copy these out because you have these working, yes? (the "current()/my:Field1" bits, etc))

    5. I've then added another filter to each Field. These are the uniqueness filters:
    Field1 has "not(. = ../preceding-sibling::msc_cpe_kit_list/cpe_vendor)"
    Field2 has "not(. = ../preceding-sibling::msc_cpe_kit_list/cpe_family)"
    Field3 has "not(. = ../preceding-sibling::msc_cpe_kit_list/country_kit)"

    6. the Entries Field in the Drop Down List Box Properties dialogue boxes show, respectively:

    "/dataroot/msc_cpe_kit_list/cpe_vendor[not(. = ../preceding-sibling::msc_cpe_kit_list/cpe_vendor)]"

    "/dataroot/msc_cpe_kit_list/cpe_family[(../cpe_vendor = current()/my:Field1) and (not(. = ../preceding-sibling::msc_cpe_kit_list/cpe_family))]"

    "/dataroot/msc_cpe_kit_list/country_kit[(../cpe_vendor = current()/my:Field1 and ../cpe_family = current()/my:Field2) and (not(. = ../preceding-sibling::msc_cpe_kit_list/country_kit))]"

    7. I've tested this and indeed it works for me. For each combobox on many rows in the repeating table.

    So, what have I done differently to you?

    • I assume your secondary datasource is the same as you've posted here
    • Your main datasource will be different, atleast a little, is it structurally the same, though? could you post it?
    • simple things like checking spelling is exactly the same, not copying the quotation marks into your code, etc
    • anything else you can think of that might have bearing on this function? (or lack thereof)


    If that turns up nothing I'm afraid I might be at a loss...


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