Error while deleting values from repreating table - InfoPath Dev
in

InfoPath Dev

Error while deleting values from repreating table

Last post 07-17-2010 07:06 AM by Skarn. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-30-2010 05:10 AM

    Error while deleting values from repreating table

    Hi. I have the following code:

                        objRoot = objXnDoc.SelectSingleNode("/my:AddFloor/my:rtbBuildingsInUseGr1/my:rtbBuildingsInUseGr2/my:listBuildings", NamespaceManager);
                        if (objRoot.Value != "")
                        {
                            objRoot.DeleteSelf();
                        }
                        else
                        {
                            return;
                        }

    and I get this error when there are no more lines to delete:

    NullReferenceException was unhadlet by the user code.

    Why? Thank you!

     How do i bypass it?

  • 04-30-2010 05:30 AM In reply to

    Re: Error while deleting values from repreating table

     I have managed to bypass it by using try and catch, but I still want to know if there is another way to bypas it. Thank you!

  • 07-17-2010 07:06 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: Error while deleting values from repreating table

    try catch would be it - makes sense - if there's no apples, and someone told me to eat the apple, i might have an error too ;-)

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