Error using delete - what have I done wrong ? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Error using delete - what have I done wrong ?

Last post 05-18-2010 09:38 AM by aruna akella. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-14-2010 03:29 AM

    Error using delete - what have I done wrong ?

    Hi

    I have a multi-selection box.  If the user selects one particular option I want to delete any other items selected.

    The field with the selection box has an xpath /my:myFields/my:SKUIntroductionGroup/my:RegionalGroup (in the main data source).

    In the rules on that field I have added a rule (see attachment).  The rule is only triggered if the value of RegionalGroup is Global.  The command I enter is Delete /xpath=/my:myFields/my:SKUIntroductionGroup/my:RegionalGroup[. !="Global"]. Followed by a call to the qRules. 

    When I select the Global option I get the error message shown below.  But when I clear that message it has done what I want.

    There are no values displayed in Success; or Error fields of the QdabraRules data source.  I am using version 2.0

    System.NullReferenceException
    Object reference not set to an instance of an object.
       at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand(Application application, XmlFormHostItem formHost, XPathNavigator commandsNavigator)
       at Qdabra.Tools.RulesLibrary.FormCode.QdabraRules__Command_Changed(Object sender, XmlEventArgs e)
       at Microsoft.Office.InfoPath.Internal.XmlEventHost.GenericProxy(Object genericDelegate, DataDOMEvent dataDOMEvent, InfoPathEvents type)
       at Microsoft.Office.InfoPath.Internal.XmlEventHost.ChangedProxy(DataDOMEvent dataDOMEvent)
       at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)

    I have obviously done something wrong - could you please advise.

    Thank you

    Catharine


    Filed under: ,
  • 05-14-2010 06:09 AM In reply to

    Re: Error using delete - what have I done wrong ?

    Hi Catharine,

    Well, I don't know that you want to completely delete that xpath! Perhaps it's acceptable to simply have a rule that sets the field's value to nothing (blank)?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 05-16-2010 07:55 PM In reply to

    Re: Error using delete - what have I done wrong ?

    Hi Catharine,

    I think I know why you are getting that null reference exception - can you delete this action(Query using a data connection : QdabraRules)? You don't have to set that action.

    Attached a pic of how this rule should look.


    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 05-18-2010 06:47 AM In reply to

    Re: Error using delete - what have I done wrong ?

    Thank you very much. 

    I thought I had to put the parameters in to the Qrules and then call the query. 

    Much appreciated.

    Catharine

  • 05-18-2010 09:38 AM In reply to

    Re: Error using delete - what have I done wrong ?

    I'm glad it's working for you :)

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.