Error Message: Repeating table (Datasource1) incl calculations using Datasource2 values - InfoPath Dev
in

InfoPath Dev

Error Message: Repeating table (Datasource1) incl calculations using Datasource2 values

Last post 01-26-2012 08:07 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-25-2012 09:05 AM

    Error Message: Repeating table (Datasource1) incl calculations using Datasource2 values

    I am working with a repeating table (RT_A). This uses data from SharepointList B (SP_B). The data displayed in that repeating table is "augmented" with an Average calculation using filtered data (My_Number) from SharePointTable C (SP_C). I achieve that by...

    • Adding a column to RT_A and inserting a calculated value field
    • In Calculated Value Properties /General /Data source pressing function button
    • In formula field choosing Insert Field/group, selecting SP_C as data source and highlighting My_Number from its data fields
    • Press Filter Data and then Add to Specify Filter Conditions
    • Here I choose on the left SP_C_Criteria1 (from SP_C), middle "is equal to", and on the right I "select a field or group"/ choose SP_B and find under data my matching SP_B_Criteria1. OK = back to Specify Filter Conditions
    • Now I change in the left field to "The expression" and I get a translation :-) saying something like: ../:SP_C_Criteria1 = xdXDocument:GetDom([...]/d:SharePointListItem_RW/d:SP_B_Criteria1
    • now I replace xdXDocument:GetDom([...]/d:SharePointListItem_RW with current(), so the expression looks like this: ../d:SP_C_Criteria1 = current()/d:SP_B_Criteria1
    • I am adding another Filter as above and do the same for a second criteria (Criteria2)
    • OKOKOK and eventually I am back at "Insert Formula" and build an avg() function around it - so I see this:

    avg(My_Number[SP_C_Criteria1 = current()/SP_B_Criteria1 and SP_C_Criteria2 = current()/SP_B_Criteria2])

    - or the same as XPath Edit :

    xdMath:Avg(xdXDocument:GetDOM("SharePointTable C")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:My_Number[../d:SP_C_Criteria1 = current()/d:SP_B_Criteria1 and ../d:SP_C_Criteria2 = current()/d:SP_B_Criteria2])

    That works good in preview ... (and took me "a day" to figure out :-) Actually it also works fine on the live sharepoint site as a web browser form

    Here is my issue: when submitting my form, I get an error warning. Design Checker highlights that "Control binding is not supported", pointing me to that calculated value and noting that "Binding a non-repeating control to a repeating field or group is not supported in Web browser forms. To fix this problem, remove the control or replace it with a repeating control, such as repeating section or table"

    Again, if I publish anyway, it works fine as a web form - so what am I doing wrong (am I?) or what can I do to get rid of that error message?

     

    InfoPath 2010 / SharePoint 2010
  • 01-25-2012 04:29 PM In reply to

    Re: Error Message: Repeating table (Datasource1) incl calculations using Datasource2 values

    Oh my gosh! I can't believe someone else has this issue to - so glad you posted. I blogged on this the other day - while I found that the form worked as a web form w/ the error - print preview functionality was broken - if I had another view set as a print view, my views wouldn't switch when I selected Print Preview.

    Here's the blog post. I'm going to edit it to include the text of the error instead of just the screenshot, so it is a bit more findable.

    At any rate, what I did was save my form as source files and remove the "xd:binding" attribute from all my expression boxes that were giving me trouble (ummm, save a copy of your form first! It is easy to break when you start changing source files!) Let me know if you need more info.

    Hilary Stoupa

  • 01-26-2012 05:46 AM In reply to

    Re: Error Message: Repeating table (Datasource1) incl calculations using Datasource2 values

    Hillary - thanx for quick reply.

    Sorry for being a bit dumb but I started with Infopath/Sharepoint only three weeks ago and I'm not a coder and this is a newbi forum ... , so i guess it's OK to ask :-)

    Would you mind to elaborate on consequences of saving as source files, please. I'm creating this in a rather complex corp environment, meaning the form needs to published as "standard" (in particular w/out code) and I'd like user to have no pain access. Would "source file format" have any effect on that or would that just be for backend manipulation during development (e.g. removing the binding) and could be saved as xsn again and published normal afterwards? Any other tools needed for that work?

    Can you guide me highlevel through how to remove the "xd:binding" attribute from all expression boxes that are giving trouble? Please note, that I have not seen source file format yet :-)

    Sorry to bother - but again: Thank you so much for being there and helping

    InfoPath 2010 / SharePoint 2010
  • 01-26-2012 08:07 AM In reply to

    Re: Error Message: Repeating table (Datasource1) incl calculations using Datasource2 values

    A form template is made up of many files - XSL, XML, XSD and sometimes others. All you see is the packed up XSN. Under the Publish option on the File page, you'll see Export Source Files. This will open a dialog allowing you to select a folder (or create a new folder) to save all these files in.

    You'll need to then open the views that have the issue in design checker in a text editor to make changes. To pack your files back up, right click manifest.xsf and select Design. From there, File / Save As resaves as a template (XSN) file.

    All that said - if you don't have need of the Print Preview functionality (you aren't using print views in your form) this error is just annoying, and hasn't seemed to cause any other issues for me. You may just want to leave well enough alone. :-)

    Hilary Stoupa

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