in

InfoPath Dev

how do i auto populate fields in a repeating table

Last post 09-25-2007 01:06 PM by Stephanie Cantwell. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-25-2007 11:14 AM

    • sjack
    • Not Ranked
    • Joined on 09-25-2007
    • Posts 8

    how do i auto populate fields in a repeating table

    is there anyway to populate fields in a repeating table?   i'm trying to create a supply request form,  i have a flat file that has 3 columns (description, item # and U/M). ideally the user would click the drop-down and choose an item based of of description, i'd like to have item # and U/M auto populate and then the user could fill in the qty field.  i found tips in Matt Faus guide "automatically populate fields from a drop-down selection" helpful but doesn't work in a repeating table.

     

    thanks,

  • 09-25-2007 01:06 PM In reply to

    Re: how do i auto populate fields in a repeating table

    I am currently having a project that requires to copy a random number of rows of data from one DOM to another.  I was told it will require code to do that.  However, I was also told by someone else that I can do it without code, but I have not found a way yet.   If you can do code, below are snippets of code in jscript to copy node from one DOM to another.  
     
    var copiedNode;


    function Remove_Node::OnClick(eventObj)
    {
                   eventObj.Source.parentNode.removeChild(eventObj.Source);
    }


    function Copy_Node::OnClick(eventObj)
    {
                   copiedNode = eventObj.Source.cloneNode(true);
    }


    function Paste_Node::OnClick(eventObj)
    {
                   eventObj.Source.appendChild(copiedNode);
    }

    function Insert_Node::OnClick(eventObj)
    {
                   var newnode = eventObj.Source.cloneNode(true);
                   var fragnodes = newnode.selectNodes("/my:Genealogy");
                   if(fragnodes.length>=1)
                   {
                                  for(i=0;i<fragnodes.length;i++)
                                  {
                                                 newnode.removeChild(fragnodes.item(i));
                                  }
                   }

                   newnode.selectSingleNode("/my:FirstName").text = "";
                   newnode.selectSingleNode("/my:LastName").text = "";
                   newnode.selectSingleNode("/my:SpouseFirstName").text = "";
                   newnode.selectSingleNode("/my:SpouseLastName").text = ""

                   eventObj.Source.appendChild(newnode);              
    }

     

    Good luck!

    Stephanie

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

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