Sending Infopath XML using SQL Stored Prod - InfoPath Dev
in

InfoPath Dev

Sending Infopath XML using SQL Stored Prod

Last post 09-02-2010 04:46 AM by HongYip. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-12-2010 03:11 AM

    Sending Infopath XML using SQL Stored Prod

    Hi,

     I am able to send an infopath form (pre-populated with data from SQL) to the user via SQL stored proc. And it looks something like this:

    It works perfectly fine when I click on the xml file and it open up in my infopath client.

     I was wondering if there was a way to make it show like the form below. (i.e not as an xml attachment but as an infopath form)

     

  • 08-18-2010 02:11 PM In reply to

    Re: Sending Infopath XML using SQL Stored Prod

    Hi HongYip,

    Not sure if you are talking about sending the view or editing the file. See below for both scenarios and some ideas.

    • If you are talking about sending the form's view as the body:

    When you send email from InfoPath using an Email Data Connection, InfoPath creates an HTML body for the email.

    When you send email from a Stored Proc, you are not creating that HTML body. You will need to change your SPROC to create this HTML body using a view of the form (one of the XSLs in the XSN package) and the XML that you want to send. This process of creating an HTML body is not perfect because InfoPath has special controls for buttons, datepickers, etc. and those cannot be easily converted to HTML. InfoPath has special logic to make the HTML look better by replacing those controls or modifying the XSLT to make the HTML look better. Obviously, that will be hard for your SPROC to do, so I recommend just creating an Email view that you use which is a read-only view which has the data in it so your recipients can read it.

    You will need to extract the XSL from the XSN and use that to create the HTML. We have tools that can help you do this and Microsoft also provides a batch tool as part of IP2003/2007 that will do the same.

    • If you are talking about sending the form as an InfoPath editable form (InfoPath running inside of Outlook)

     You will need to tell Outlook that the content type is an InfoPath form so that it knows to open InfoPath instead of Word or the default Outlook canvas to render the form. I'm guessing there is an option when you create the envelope to specify content type, but we don't have much experience doing this. Please look at what Outlook provides here. It's probably documented somewhere. If not, you may be able to save an MSG file that does open in InfoPath and see the header of the email to identify the correct values.

     Hope this helps in some way. Sorry I don't have a silver bullet.

     

     

    Patrick Halstead
    Project Manager at Qdabra
  • 09-02-2010 04:46 AM In reply to

    Re: Sending Infopath XML using SQL Stored Prod

    Hi Patrick,

    Wow, thanks for the details explanation and pointing me to the right direction where I can explore further on.

    I was looking at sending the form as InfoPath editable form. It looks so much better than receiving an infopath form in the form of an XML attachment.

    Will do more digging.

    Thank You.

    Cheers,
    Hong Yip

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