Another Cascading List box Q - InfoPath Dev
in

InfoPath Dev

Another Cascading List box Q

Last post 11-14-2006 08:00 AM by Matt Faus. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-08-2006 03:41 PM

    • TimK
    • Not Ranked
    • Joined on 11-08-2006
    • Posts 5

    Another Cascading List box Q

    I have been beating my head against the wall trying to figure out how to get this working properly. I have been reading the site heavily trying to find the answer, but nothing has worked..

    I am creating an order form for users to speed up the ordering of items. I have a sharepoint list that i have setup to store the data of the items that get called for the listbox. In a repeating section, i have created a DD listbox that I am trying to use to help narrow down the selections, so from the datasource, it is reading the Item_Heading to display things like Toner, Software etc and then i have another cascading one next to it based on the response. Since there are multiple items of each type, i am trying to limit the first listbox to only display each matching Item Heading only once.
    From what i have read on the site, this is what i am filtering on in the listbox..

    not(. = ../preceding-sibling::dfs:Product_List/@Item_Heading)

    where Product_List is obviously the name of the group in the 2DS.
    When i preview the form, it lists every one of the Item_Heading entries in the listbox(ie toner is listed numerous times.)

    Hopefully i have included enough info for one of the gurus to help, but forgive me if there is more info needed... i am relatively new to infopath..
    Am i being completely stupid, or what am i missing?
  • 11-09-2006 08:27 AM In reply to

    Re: Another Cascading List box Q

    I suspect that this is a namespace issue. I've never seen a user-defined field have the 'dfs' namespace. You might want to check out the following tutorial and rework your XPath.

    http://infopathdev.com/howto/tutorials/default.aspx?i=ed2cf0c5895f468995cdd081cf17fead
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 11-09-2006 09:46 AM In reply to

    • TimK
    • Not Ranked
    • Joined on 11-08-2006
    • Posts 5

    Re: Another Cascading List box Q

    I was actually able to get this working, by changing the entries box on my data connection to point directly to the field that i am reading (Item_Heading) instead of the higher folder of Product_List and using the filter not(. = ../preceding-sibling::dfs:Product_List/@Item_Heading). My new problem, is similiar to another thread that you had commented on back in April, http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2167&SearchTerms=repeating,table,more,rows) about the next row in the repeating table having the contents carry down to the next list box. I know where the problem is, but i cant figure out how to fix it.

    I have 2 DD List boxes in the repeating table, one Named ItemType and one named desc1 . ItemType contains the Toner, Software etc categories(read from 2DS Item_Heading field), and i want description to display the approriate entries(read from description field in 2DS) based on the ItemType. I know i need to filter based on the current() , but i cannot get it to list the items in the desc1 box when i try to come up with the correct formula. In desc1, if i filter just on ItemType=Item_Heading it displays the proper items, but they then also repeat down to the next row listbox. What am i missing on this one? I appreciate any help... i am new to this, but unfortunatly know enough to be dangerous

  • 11-09-2006 01:20 PM In reply to

    • TimK
    • Not Ranked
    • Joined on 11-08-2006
    • Posts 5

    Re: Another Cascading List box Q

    I found some articles with info to point me in the right direction, but i am still having one problem. As other have had issues with as well, i am unable to get the cascading DD to display only the matching selection when repeated, or anything when i try to use the current() filter.

    Main DS (omitted non relevent fields)
    myFields
    -my:ProductInfo
    --my:ProductGroup
    ---ItemType
    ---desc1

    2DS (one of 3 omitting non relevent fields)
    myFields
    -datafields
    --Product_List
    ---Item_Heading
    ---Description

    I have 2 DD boxes that i have the values populating

    1st DD is named ItemType and it is bound to Item_Heading with the xpath being
    /dfs:myFields/dfs:dataFields/dfs:Product_List[@Item_Heading[not(. = ../preceding-sibling::dfs:Product_List/@Item_Heading)]]
    2nd DD is named desc1 and it bound to Description with the xpath currently
    /dfs:myFields/dfs:dataFields/dfs:Product_List[xdXDocument:get-DOM()/ns1:myFields/my:ProductInfo/my:ProductGroup/my:desc1 = current()@Item_Heading]
    I know the filter is wrong right now, but i cannot get the 2nd DD to display properly with any of the numberous ways i have tried.
    when i run a local-name(current()) from the desc1 box, it returns desc1

    I am looking to have the filter return only rows that ItemType = ItemType current and place the description as the result.

    Any help is greatly appreciated. As you can tell i am no programmer, but a Desktop support guy stuck developing forms for our Service Desk
  • 11-09-2006 02:32 PM In reply to

    • TimK
    • Not Ranked
    • Joined on 11-08-2006
    • Posts 5

    Re: Another Cascading List box Q

    well... it always seems that shortly after posting, i solve it on my own (well, not on my own, but with all the good info on the site). I ended up with the xpath of
    /dfs:myFields/dfs:dataFields/dfs:Product_List[@Item_Heading = current()/my:ItemTag]

    to fix it... simple solution.. hard to figure out...
  • 11-14-2006 08:00 AM In reply to

    Re: Another Cascading List box Q

    Hey Tim,

    Sorry for the late response, but it's great to hear you got it figured out! Sometimes it's good to just walk away from it and come back to it. It's surprising how many situations this works in.

    Cheers!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.