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.