Expression box in repeating table - InfoPath Dev
in

InfoPath Dev

Expression box in repeating table

Last post 02-16-2006 07:12 AM by martintheace. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-01-2006 07:24 AM

    Expression box in repeating table

    I have a repeating table that is populated from a web service. This table contains Product Structure information about a parent part number. Inside of this table I want to capture the description of each component part in an expression box. I am doing this by using a XML file as a secondary data source. I have comparisons and filters in place to match up the component number to a comparable part number and description in the XML file. My problem is the expression box will capture the first description of the component. It will then display that description in every expression box in the repeating table. I want the expression boxes to have the descriptions of the related component number. How can this be done?

    Thanks

    Marty Mortenson
  • 02-01-2006 09:24 AM In reply to

    Re: Expression box in repeating table

    Could you paste the XPath you have for the expression box?

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-06-2006 09:54 AM In reply to

    Re: Expression box in repeating table

    Matt

    Here is the xpath statement in the expression box

    xdXDocument:GetDOM("Description")/ns1:myFields/ns1:Comp/ns1:Desc[../ns1:comp_part=xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/tns:GetItemProfileResponse/tns:GetItemProfileResult/NewDataSet/rootTD_C_ITEM_PROFILE/TD_C_ITEM_PROFILE/ITEM_PROFILE_Ps[position()]/Component]

    Thanks


    Marty Mortenson
  • 02-06-2006 07:53 PM In reply to

    Re: Expression box in repeating table

    Ah, I see what you're trying to do. This can be tricky sometimes.

    I suggest applying this tutorial to add a id number to your row:
    http://infopathdev.com/howto/tutorials/default.aspx?i=d663d7df90e94e65abb02632966e8127
    and then use the number from that field instead of the position() function.

    I hope this works, please let us know if you figure it out.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-07-2006 09:53 AM In reply to

    Re: Expression box in repeating table

    Matt,

    I looked at the tutorial, and that seems to be the answer to my question. Will I have to add a number field to my webservice to generate the autonumber? Next question, to capture the row number will I use the number() function.

    Thanks




    Marty Mortenson
  • 02-16-2006 07:12 AM In reply to

    Re: Expression box in repeating table

    All,

    In order to make this work I had to use the current() function.
    Here is the xpath.

    xdXDocument:GetDOM("im")/im/item/description[../id = current()/Component]

    Thanks



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