How to clear / delete / reset a table - InfoPath Dev
in

InfoPath Dev

How to clear / delete / reset a table

Last post 07-20-2007 07:19 AM by moestavern. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-20-2007 06:29 AM

    How to clear / delete / reset a table

    Hi all,

    after digging into the various online sources my first infopath form does nearly everything I wanted it to do, except for one thing.

    My for mallows the user to seearch for products from a database. The query result list (repeating table RT1) allows the user to select one or more products, press a button upon which the selected rows will be copied from RT1 to another repeating table RT2.

    What I want to do is refresh / clear / delete the query result table after the selected products have been copied from RT1 to RT2 so that the user can begin a new search for products without seeing the "old" query results in RT1.

    I tried things in my code which handles the button click to transfer row from RT1 to RT2, but all my efforts using removeChild method somehow fail.

    Any suggestions on how to do this ?

    cheers stefan
     

     

     

     

  • 07-20-2007 07:19 AM In reply to

    Re: How to clear / delete / reset a table

    Got it, I guess you just have to have a coffee break once in a while ;-)

     

     

    var allTheNodes = objSource.selectNodes("//d:Products");

    for (var i=0; i<allTheNodes.length; i++) {
    Item = allTheNodes.item(i); 
          
    objSource.removeChild(Item);
    } 
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.