Got the "Index was out of range" error when publish the form to sharepoint library. =( - InfoPath Dev
in

InfoPath Dev

Got the "Index was out of range" error when publish the form to sharepoint library. =(

Last post 08-09-2009 08:26 PM by lanijade. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-06-2009 07:17 AM

    Got the "Index was out of range" error when publish the form to sharepoint library. =(

    I got stuck with infopath07 and sharepoint library.

    I've tried to publish the infopath form to sharepoint site but I got this error.

    "The SOAP response indicates that an error occurred on the server:

    Server was unable to process request. ---> Index was out of range. Must be non-negative and less than the size of the collection.

    Parameter name: index"

    In the past, I have created many forms and did the same steps as this one. I never got this error. So I really have no idea how to figure it out. =(

     Does any one have any idea? Please help me.

     Thank you.

    Nikki

  • 01-06-2009 09:27 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Got the "Index was out of range" error when publish the form to sharepoint library. =(

  • 01-07-2009 08:06 AM In reply to

    Re: Got the "Index was out of range" error when publish the form to sharepoint library. =(

    Thank you Shiva. =)

  • 07-27-2009 09:44 PM In reply to

    Re: Got the "Index was out of range" error when publish the form to sharepoint library. =(

    I must have come back to this post at least 30 times by now. I don't see how the link provided relates to the problem.

    I am having the same issue publishing a form. It gets data from an external XML file (that can be imported into the file as a  Resource, it doesn't make any difference). I get that error when publishing or checking on the server. When I remove all of the rich text fields that depend on the XML data, the error goes away. How can I use the data from the XML file (In which the nodes contain XHTML) in my form without getting the error?

     The link sent as a solution has nothing to do with it and is about SQL reporting services. The only thing in common is the actual .NET error that is thrown upstream.

    So, I guess the question I should also ask, is, Nikki, how did you solve your problem?

    Thanks,

    --mobrien118

  • 07-27-2009 10:27 PM In reply to

    Re: Got the "Index was out of range" error when publish the form to sharepoint library. =(

    EDIT: EDIT: I FINALLY DID solve it. The problem was rules on the fields that looked like this: [Condition: CheckBox {is equal to} "true"] THEN [{set} Read Only]

    I guess it is redundant anyway, since the XML file is not writable by the form anyway (since it is a "receive data" source). I can't BELIEVE this little thing has caused me so much TROUBLE! How do you guys deal with developing in Microsoft Land all the time?

    Anyway, thanks to anyone who read this with the intention of helping!

    I am keeping my previous edits intact, for anyone who is interested:

    EDIT: I did not solve it. For some reason, I thought that was working, but it was not. Here is what I posted when I thought it was working:

     

     Never mind. I solved it.

     The issue I was having was caused by my using a secondary XML data source as such:

    1. There are two types of fields in the datasource, and, I must admint, I am no XML expert and probably needed a schema. Anyway, there are true/false fields and "xhtml" fields.

    2. When a checkbox is checked (which is bound to one of the true/false fields in the XML file), it changes a "Rich Text Box" which is linked to one of the xhtml nodes, from "Hidden" to "read only".

     

    This was causing a problem, for some reason. It worked fine in the InfoPath client, but I got that error when trying to publish to the web. The design checker didn't catch this, but would throw the above error, also, when run.

     

    I don't know if this will help anyone, but my solution was to create the true/false fields in the main datasource and bind the checkboxes to them. This seems to have fixed the problem.

     

    --mobrien118

  • 08-09-2009 08:26 PM In reply to

    Re: Got the "Index was out of range" error when publish the form to sharepoint library. =(

    Same problem occurred for me on a rich text field with conditional formatting relying on a data source.

    I too used true/ false fields in the main data source to get this to work.

    Seems like a bug to me.....

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