Why can't a secondary data connection be both submit and receive? - InfoPath Dev
in

InfoPath Dev

Why can't a secondary data connection be both submit and receive?

Last post 02-03-2010 02:24 PM by Sean Sharepoint. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-29-2009 07:02 AM

    Why can't a secondary data connection be both submit and receive?

    Can someone explain why you can't pass a parameter to a web service, as a secondary datasource, and have it return some data?

    Since InfoPath can pass parameters (submit) to a web service and can get back data (in the form of a datasource) that it ought to be able to do both with the same secondary data connection. 

    What's the reason??

    The only workaround I can think of is to use one webservice to store the parameters as global variables in my webservice, and make different (submit) webservice which uses those variables. 

     Dave

     

  • 12-29-2009 03:55 PM In reply to

    Re: Why can't a secondary data connection be both submit and receive?

    If your web service takes parameters, they show up as query fields when you create a receive type secondary data connection to that web service. In your form, you can use rules on a field or a button to populate those query fields and then run the query -- which would return the data based on those parameters. Does your web service have parameters? Are you having a different experience when you create a secondary data connection to it?

    Hilary Stoupa

  • 12-30-2009 04:29 AM In reply to

    Re: Why can't a secondary data connection be both submit and receive?

     

    Yes, it's working for me now.  I don't know why I couldn't get it to work in both directions yesterday.  Thank you for the reply, Hilary.

     

    Dave

     

  • 02-03-2010 02:24 PM In reply to

    Re: Why can't a secondary data connection be both submit and receive?

    Hi Hilary,

     I am having a similar problem, I have a receive data connection that receives data from a web service method that requires an input parameter, which pulls data from a database. When I create the data connection, I set the value to a Username (pk) in the database. But I need this to be determined dynamically in the form (every employee has a unique username, so I am using set a default text box username() function, and I want to pass in that value as the parameter ). How do I do this?

     I saw that you mentioned using rules to do this, so I have tried to use the field that pulls userName(), and put a rule on it to set the queryField in my data connection to this fields value. but when I preview the form, I get this error: There is an error in XML document (1, 434). ---> System.FormatException: Input string was not in a correct format.

     This userName parameter is definitely a string throughout my web service, stored procedure, and table, and the text box in InfoPath is a string, so Im not sure why this happens. If I try to preview a new form with this only this data connection, and not even any text boxes, I get the same error when the form loads.

    Any ideas? Thank for your help 

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