Submit schema group, then query results from web service - InfoPath Dev
in

InfoPath Dev

Submit schema group, then query results from web service

Last post 07-27-2007 09:10 AM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-26-2007 11:19 AM

    • admot
    • Top 500 Contributor
      Male
    • Joined on 08-09-2006
    • USA
    • Posts 51

    Submit schema group, then query results from web service

    Hi all,

     

    I did a search before posting and found results for querying and submitting but not vise versa.

    What I would like to do is submit an xml schema group from there, I want to retrieve webservice xml data which I can populate attributes all based on the data submitted.

     

    I can submit a specific schema group and I can also retrieve data from a webservice but I can only do it on separate actions in a rule. I need to perform a submit+retrieve in one action. The Query action doesn’t seem to provide a way to submit more than just the one control.

     

    To help envision, I have a pull down. Every time a user selects a pull down, it submits the input data entered in from all the other fields in that section. In the background (independent from InfoPath), the inputs influence within the section influence specific elements. From there InfoPath queries this data and each one is pulled into an attribute.

     

    Thoughts?

    Don't grow old regretting the things you didn't do.
  • 07-27-2007 04:41 AM In reply to

    Re: Submit schema group, then query results from web service

    I don't understand why using multiple actions in one Rule, or even multiple Rules is a problem.  The rules run in a deterministic order, so it should all be the same.

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-27-2007 06:55 AM In reply to

    • admot
    • Top 500 Contributor
      Male
    • Joined on 08-09-2006
    • USA
    • Posts 51

    Re: Submit schema group, then query results from web service

    In one rule, I can place in a submit action and a query action. This submit action is supposed to manipulate data G in the background. The query action is designed to pick up that manipulated data G. The problem is once the submit action is complete, the manipulated data G isn't stored anywhere. The query then just pulls the data G as if a submit never occured. A submit and immediate query action would resolve this.

    Is there a way the submit can cause the manipulated data G to store inside a temporary xml? From there, I can use a query to pull up the xml.

    Don't grow old regretting the things you didn't do.
  • 07-27-2007 09:10 AM In reply to

    Re: Submit schema group, then query results from web service

    Ah, I see your problem.  It's not that your too slow in getting to the data, it's that it is never stored onto that DOM.  We have hit this problem a couple times when working with DBXL.  If you want to remain codeless, then you should transform your Submit data connection into a Query data connection.  These two are the same thing in the underlying framework, they are just presented to through the IP Designer in a more user-friendly way.  So, turn your current Submit connection into a Query connection, load your values into the queryFields node, and then Query it.  When it is done, the result will be stored under the dataFields node.  This is where your second Query connection can pick the data up from.

    If you want to use code you can use the OutputLocation of the WebServiceAdapter2 object to look at the XML that is returned by the web service.

    WebServiceAdapter2 wsAdapter = (WebServiceAdapter2)thisXDocument.DataAdapters["MySubmitDataConnection"];

    wsAdapter.Submit();

    thisXDocument.UI.Alert(wsAdapter.OutputLocation.xml);

    wsAdapter = (WebServiceAdapter2)thisXDocument.DataAdapters["MySubmitDataConnection"];

    wsAdapter.Submit();

    thisXDocument.UI.Alert(wsAdapter.OutputLocation.xml);

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.