Email from a repeating table. - InfoPath Dev
in

InfoPath Dev

Email from a repeating table.

Last post 11-09-2005 09:40 AM by franck. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-08-2005 02:18 AM

    • Sadoun
    • Not Ranked
    • Joined on 11-08-2005
    • United Arab Emirates
    • Posts 5

    Email from a repeating table.


    Interesting Forum
    I am recent to InfoPath and a beginner, but what an application.

    I am making a distribution list within a form, simply a repeating table from one field called “Email” and a text field, I am trying to join the listed records from the repeating table into the text field to use it as Email addresses.

    I tried the "concat" function for the text field, but it displayed duplicate string.

    Appreciate any assistant for a code or a function.

    Thanks,
    Saleh
  • 11-08-2005 08:27 AM In reply to

    Re: Email from a repeating table.

    Hi,

    You may have to tell us more. "duplicate string"? Do you mean it is always showing the same result, from row 1 for example?

    Regards,

    Franck Dauché
  • 11-08-2005 08:32 AM In reply to

    • Sadoun
    • Not Ranked
    • Joined on 11-08-2005
    • United Arab Emirates
    • Posts 5

    Re: Email from a repeating table.

    Hello,
    Yes its always show the same result from first row.

    Regards,

    Saleh
  • 11-08-2005 10:12 PM In reply to

    Re: Email from a repeating table.

    Hi,

    Is your problem the same as that described here:
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=786

    Regards,

    Franck Dauché
  • 11-09-2005 09:40 AM In reply to

    Re: Email from a repeating table.

    OK, I see what you are talking about from the pic that you sent me.

    What you can do is loop trhough your repeating section by code behind and build your string (for the join textbox):

    string sJoin = "";
    IXMLDOMNodeList oNodeList = thisXDocument.DOM.selectNodes("my:myFields/my:group1/my:group2");
    if (oNodeList.length>0)
    {
    foreach (IXMLDOMNode oN in oNodeList)
    {
    if( oN.nodeType == DOMNodeType.NODE_ELEMENT )
    {
    IXMLDOMNode oField = oN.selectSingleNode("my:field1");
    sJoin = sJoin + ", " + oField.text;
    }
    }
    }

    Just remove the leading comma and feed that to your string node below the repeating section.

    Hope that it helps.

    Regards,

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