Upon Submit email different view

Posted on 2009-02-12
Last Modified: 2013-11-25
I want upon submit an email to be sent to the email address in the email field (easy enough) the problem is I want the email to contain a different view.   I have an input screen that based on selections fills out one of 35 views, I want when the end user hits submit the correct view to be emailed to the client not the information view.  When i place a submit button with a switch view it does not then email the view other then the input screen.
Question by:Andrew Bass
    LVL 28

    Accepted Solution

    What happens is when the second person opens the form there is no logic but to open to the default view.
    Here is the trick.

    You need to modify your form so that it opens to the correct view.
    Add a field in the form to track the view, currentview.
    Add a rule action to the email button which set currentview to the viewname.
    Then put an open rule which checks currentview and changes the view on open to the view selected.

    This is what you want, the second user opens the form to the view which first user sent them
    LVL 1

    Author Comment

    by:Andrew Bass
    Hey Clay, so here is the issue with that.  The secondary view is a non editable print view which i relistically want to have it print as an image file and send to the client, I do not want the client to have a view of infopath at all.  
    LVL 28

    Assisted Solution

    Are you using 2007?

    Then you can email a view rather than attach the form.

    Also a trick is that on the button you can add the actions to switch view, then submit to email, then close the form.  You can then make this transparent to the user.

    If you want to print to email or something there are some third party apps or coding could fit this scenario.
    LVL 1

    Author Comment

    by:Andrew Bass
    The problem is I am making it in 2007 but it has to be compatable with 2003 which makes the biggest issue, I found a line of coding I can use but I need InfoPath SP and InfoPath Toolkit to do it, my worry is this will cause existing forms ive made to be in jeopardy or it will require the end users to have these add ins.
    LVL 1

    Author Closing Comment

    by:Andrew Bass
    Didnt help but answered the question none the less, thanks Clay

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now