Email Webservice Secondary Data Connection - Repeating Group - InfoPath Dev
in

InfoPath Dev

Email Webservice Secondary Data Connection - Repeating Group

Last post 02-06-2011 05:17 PM by Maureen57. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-04-2011 07:17 AM

    Email Webservice Secondary Data Connection - Repeating Group

     I have a repeating group on a form, based on a secondary data source.  Each instance contains an email address and a button.

     I also have a webservice EMAIL connection as a secondary data source.   When I click the button, I have a rule to send an email through the webservice.

     Surprise, the email always goes to the email address in the FIRST instance of the group.

     See the attached parameters for the web service call....can I change these to somehow indicate relative path?


     

     


  • 02-05-2011 12:16 PM In reply to

    Re: Email Webservice Secondary Data Connection - Repeating Group

    Hi Maureen57 and welcome,

    Thanks for the nice image. This is an easy problem. You need to use the current() command in your xpath to get the current row. Search this site for "xpath current". I believe Greg has several post but there are probably 100 threads on it. It's probably the most popular question people have.

    Patrick Halstead
    Project Manager at Qdabra
  • 02-05-2011 05:11 PM In reply to

    Re: Email Webservice Secondary Data Connection - Repeating Group

     Hi Patrick and many thanks for the help...glad it is an easy one!

    I can copy the Xpath, and I have used the current / relative xpath in code like this---

    comments = eventObj.Source.selectSingleNode("@Comments").text

    However, in the email webservice dataconnection, it won't let me enter anything  except the entire xpath..

    See picture - I cannot remove the /dfs:myFields/dfs:dataFields/d:vw_Fedex_SPOD_N/@Email to just have the relative path @Email.   The Infopath GUI won't let me.

    The GUI for this webserice data connection only lets me pick a field from the data connections,exactly as it is.  No changes to XPATH.

    Should I setup another data connectionto use in the email webservice,and populate it with the current xpath?

     

     

     

     


  • 02-06-2011 01:18 PM In reply to

    Re: Email Webservice Secondary Data Connection - Repeating Group

    Ah, so you're talking about parameterizing your query! That's a little different. Forget about the data connections wizard - just put anything in there that returns 2 or more rows for now. Then, in your form, add a Query button and add a rule to that to set the query data connection's parameter before querying the data connection. When you add a rule with an action to set a field's value you are given a different dialog that lets you create an xpath using functions like current(). etc.

    I hope this gets you a little further, but please reply if it's not clear as mud! :)

    Patrick Halstead
    Project Manager at Qdabra
  • 02-06-2011 05:17 PM In reply to

    Re: Email Webservice Secondary Data Connection - Repeating Group

     

     

    That got it!!!   THANK you so much.

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