Delimeters in Repeating Tables Embeded in Repeating Sections - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Delimeters in Repeating Tables Embeded in Repeating Sections

Last post 10-30-2010 08:43 PM by Qazi Anis. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-23-2010 02:25 AM

    Delimeters in Repeating Tables Embeded in Repeating Sections

    I have technical issue I'm trying to overcome as it applies to exporting sharepoint lists based on Infopath forms to Excel to create reports as it applies to Repeating Tables embeded in Repeating Sections.  Wow thats a mouthful!

    Ok lets see if I can break this down a bit.

    What Im trying to acomplish

    I have an infopath form with repeating tables (repeating fields) that are being pushed out to a sharepoint forms library list using the "merge" function.  This displays data in a nice neat format in sharepoint stacking each field added to from a repeating table field.  We now have a new requirement where we export our sharepoint lists based on this form library to excel for reporting purposes.  Naturally since its a merged field when exporting to excel the field is merged in excel as well.  The goal is to split these fields up into seperate fields in excel.  The simplest way I can think of doing this is to add a delimeter (a comma for example) into the field during the creation of the form so that it appears in the sharepoint list and hence is exported with the delimeter to excel.  This would allow us using excel (replace function) to split up the cells into seperate fields for various calculations, lookups etc..

    How to accomplish this in Infopath

    I know that the function I should be using is the Eval function (I have read a few posts on the topics here) but I think my situation is a bit different then the examples and Im having trouble structuring it.  I created an example with screen shows here just for clarification.

    Infopath Example





    In the first box I select from a list of items, adding more items by clicking Insert Item when in preview mode.

     When this form is published I use the "Merge" function.

    When its saved to the form the items display as followed


    The merged field appears stacked, but no delimeters naturally.  When you export this to excel it looks the same in the cells (merged fields).

    What I need to do is seperate these items by a delimeter.

    The question is how to best acomplish this.  first and foremost is there a built in function in Infopath (an option in the advanced menu or otherwise) that can acomplish this without any special functions or usage of code.  if not, assuming we are using the Eval function, how exactly should it be scripted. 

     I suspected that it should be pushed out to a temporary text field and use the concat function or a combination of eval and concat but everything I have tried has prompted errors in the formula.  I suspect Im on the right track but havent been able to get it quite right. 

     Any help would be appriciate it, its more important that I understand the "hows" of it then just fixing the problem so any detail would be in particular helpful.

    Thanks in advance for any help


    Just FYI:  this is the Eval im trying to get working, I believe its roughly correct but its complaining that Im missing an apperand, but I really can't see where




  • 02-23-2010 05:23 AM In reply to

    Re: Delimeters in Repeating Tables Embeded in Repeating Sections

    try this 

    xdMath:Eval(xd:Math:Eval(my:group1/my:Delimiter/my:group3/my:group4, 'concat(my:ProductCapture, ";")'), "..")



    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-23-2010 07:16 AM In reply to

    Re: Delimeters in Repeating Tables Embeded in Repeating Sections

    ok now that was helpful, still not working but I think its an issue with path now rather then syntax

    The error im getting now is


    Reference to undeclared namespace prefix: 'my'.

    Error occurred during a call to property or method 'Eval'.

    Coincidently I think I had one collon to many there (inbetween XD and MATH in the second eval so the above error comes after removing it.


  • 02-23-2010 09:53 PM In reply to

    Re: Delimeters in Repeating Tables Embeded in Repeating Sections

    so is it working now

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-23-2010 11:37 PM In reply to

    Re: Delimeters in Repeating Tables Embeded in Repeating Sections

    No unfortunatly it hasn't worked, I can't seem to get around the error.

    What I was thinking is to do this at run time through go (on the save event).

    I mean all I really need to do is add a delimeter to the repeating table data and perhaps trying use the eval is not the best way to go about it.

    One method Im having partial success with is adding the delimeter through sharepoint using a calculated field and then referencing that value.

    So for example the repeating table data looks directly at the XML document and uses the calculated field for its value.

    This actually works quite well adding the delimeter in the sharepoint list but it also adds some extra characters.

    It shows up looking like this

    string;#30 11 90,
    It adds the "string;#" to the fields data.

    Not really sure how I can get rid of it, but at least the delimeter is there now. 
    I wish infopath repeating tables just had a simple option to add a delimeter, it seems like such an obvious nescessity for proper data control since obviously sharepoint list data will often be used for reporting and having the merged field requires that there is a delimeter for the data to be usable in excel.
    At this point though Im happy to consider any work around or options.
  • 10-26-2010 02:15 AM In reply to

    Re: Delimeters in Repeating Tables Embeded in Repeating Sections

    This is a reply (update) to this post that I made a while back.  I thought since my current issue is similiar to this one I would pick off where I left of.

     The issue this time is kind of the same.  I'm trying to use the double eval function to concat a merged field so that I can add a delimiter to the field for the purposes of an excel spreadsheet export.

    Im using the default value of a an extra field to perform the following function

    xdMath:Eval(xdMath:Eval(../../my:MainTable/my:group5, 'concat(../../my:MainTable/my:group5/my:Unit, ";")'), "..")

    The function works to some respects.  It does draw the data from the merged field and group and concatinates it with a delimiter (;).  However it uses only the value of the first entry repeatadly rather then the added fields in the repeating table rather then the consecutive values.  I suspect Im just doing something wrong here in the formula. 

    Any help would be greatly appriciated :)

  • 10-30-2010 08:43 PM In reply to

    Re: Delimeters in Repeating Tables Embeded in Repeating Sections


    xdMath:Eval(xdMath:Eval(../../my:MainTable/my:group5, 'concat(my:Unit, ";")'), "..")

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.