Data connections - InfoPath Dev
in

InfoPath Dev

Data connections

Last post 02-24-2010 08:45 AM by eg10013. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-22-2010 11:23 AM

    Data connections

    I actually have two questions regard to data connection.

    (1) I set up data connections in a sharepoint data connection library. So every time user open the form, it take couple seconds to connect to the data connection library. Is there a way to connect to the data connection library only when it is a new form? I only need to lookup data when it is a new form.

    (2) I use data connection to send email notification. Is there a way that I do not include attachment? There is a section that the sender can see it but the receiver should not be able to see it. That works fine when the receiver open the form via URL. However, the data connection force me to include an view or attatchmen. Because the sender can view the section, so the the section is viewable to everyone in the body of email.

    I will appreciate your help. 

     

  • 02-22-2010 12:06 PM In reply to

    Hi,

    For your first question take a look at this forum post: http://www.infopathdev.com/forums/p/8261/29968.aspx#29968  You can do what you want.  You may also find that haveing all the data connections be "on demand" for even new forms is ok and better performance.

    As to the 2nd question - If I understand your quesiton correctly what you need to do is to have a special view created for email, that view is blank and when the user submits the form via the email submit you first switch to that view and then the rest of the submit rules execute - this will result in the user seeing a brief flash to the email view that is blank but then the email won't contain the section you don't want shown. 

    Hope that helps

    Ted

  • 02-23-2010 10:56 AM In reply to

    Thank you for your response.

    (1) In my knowledge, if I create a data connection, it is always executed when the form is open? So do I need to stop this automatical execution first (and how). Then run the this code this.DataConnections["DataConnectionName"].Execute(); when it is a new form (and how)?

    (2) Yes, I will need a second view and switch to the new view before send email. 

     

  • 02-23-2010 01:39 PM In reply to

    Sorry about that I have more questions.

    I setup a new view that contains just portion of the default view. I add a rule to switch to the new view before I use a data connection to send email. In the database connection, I select "Send only the active view of the form and no attachment" option. I except the new view should be include in the body of the email. However, nothing show up in the body of email. Do you know what can be the problem?

     

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

    If you can post the template to this thread that might help.  I know this issue does come up from time to time (see here: http://www.infopathdev.com/forums/p/7457/27255.aspx#27255) it may have to do with timing of the events in the submit rules somehow.  If the template is easy enough for me to look at and preview on my computer I might be able to help with that.

    Ted

  • 02-24-2010 08:45 AM In reply to

    I cannot find a way to uplad the template here.

    These are the rules in the button.

    setCurrentTime           - set field value

    SignAndSetStatus      - set fields value

    Submit                      - submit the form to sharepoint document library

    SwitchView2              - swich form

    EmailToDistribution    - send email 

    Confirmation              - pop-up box

    CloseForm                - close form

    I have tried to move the switch rule to the top. It still does not work. But if I remove the switch rule, then the default view is show in the mail body. Thank you very much for your help. Also can you please give me more information on how to excute the data connection only for it is a new form. This is my first infopath project. I am under lot press to move my Lotus Notes application to SharePoint/InfoPath. 

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