Noob Question: about Textbox in a repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Noob Question: about Textbox in a repeating table

Last post 08-16-2011 03:33 PM by Lockdown. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-15-2011 02:38 AM

    • spider
    • Not Ranked
    • Joined on 08-15-2011
    • Posts 1

    Noob Question: about Textbox in a repeating table

    Hi All,

     I am working with infopath 2003 and access 2003. The acces database contains tables for both recieving data and for sending data.

     My problem is that:

    1) My infopath form has a 2 textboxes. One  (ITEM_ID)  is used by the user to type in the data. The other (ITEM_TYPE) is automatically populated from another ACCESS table. Each Item ID has a one-to-one relation with the ITEM_TYPE.

    2) Normally, a user adds 3 ITEM_IDs and hence the need to use a repeating table.

     3) When I input the first ITEM_ID, the infopath form queries the ACCESS Table and fills in the ITEM_TYPE into the second textbox automatically. so far so good.

    4) When I input the second or third ITEM_ID, the form queries the ACCESS TABLE, but still uses the same ITEM_TYPE from the first query into the second textbox.

     It Looks like this

    ------------------------------------------------------------

    Item_ID          Item_Type

    ABC              abc

    DEF              abc

    ----------------------------------------------------------

    It should look like this:

    ----------------------------------------------------

    Item_ID          Item_Type

    ABC              abc

    DEF              def

     -------------------------------------------------------

    I have been reading around and know that there is something called a Current() function, but I cannot get it to work.  How can I force infopath to throw out all information from the previous ITEM query before it proceeds with the second query.

    Regards,

    spider

    Filed under:
  • 08-16-2011 03:33 PM In reply to

    Re: Noob Question: about Textbox in a repeating table

    Ya, it definitely looks like you have to use current(). This is the way I used it though, it may be of some help.

    xdXDocument:GetDOM("Specifications")/Specifications/FlatFileSpecs/CCR/Header/RecordID/Description[current()/@PmtMethod = "CCR"]

     So yours will looks something like this.

    "Query for ITEM_TYPE"[current()/ITEM_ID = ABC] | "Query for ITEM_TYPE"[current()/ITEM_ID = DEF]

    Post the function you are using to populated the ITEM_TYPE text box.

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