Error with xsi:nil attribute - InfoPath Dev
in

InfoPath Dev

Error with xsi:nil attribute

Last post 12-11-2007 09:56 AM by Greg Collins. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-07-2007 08:48 AM

    Error with xsi:nil attribute

    I have a broken node. This node was originally a text field that stored prices. I know I know... Well I converted it to double and published the form. I thought everything was ok but it started erroring out on prices that had parenthesis (.90) so I changed it back to text. Now, new forms can open just fine but old forms error out on load with this error:

    xsi:nil attribute on element '{http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-12-12T22-07-01}PROFPRICE' is invalid.

     I thought for now I could loop through the nodes and remove the nil attribute but that doesn't seem to be working. Anyone have any ideas? Anything would be greatly appreciated!

    Shaun Nieves
    Sharepoint Manager
  • 12-07-2007 09:36 AM In reply to

    Re: Error with xsi:nil attribute

    When you converted the node from Text to Double, you left it as not required, which is why the xsi:nil attribte was placed on the fields. If you have a Double that your mark as required, there will be no xsi:nil.

    Now, can you use that information to create a fix? Perhaps. It depends on the process you went through the first time and how many forms were affected.

  • 12-07-2007 11:36 AM In reply to

    Re: Error with xsi:nil attribute

    There's about 1500 existing forms. I changed it back to double and it they haven't errored out yet. Will that blow the values in the saved forms? I was doing a calculation on the node which was why it bombed out. I'm going to try and do the calculation using managed code. Hopefully it works.

    Shaun Nieves
    Sharepoint Manager
  • 12-11-2007 09:56 AM In reply to

    Re: Error with xsi:nil attribute

    Changing the data type in your schema should not affect the values stored in the field in your forms (except for possibly marking them as invalid values).

    XPath calculations work against strings as well as numbers. Normally, XPath doesn't care about the data type. However, if you want to be sure a values is treated as a number, use the number(field) function.

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