Emailing Alternate View - InfoPath Dev
in

InfoPath Dev

Emailing Alternate View

Last post 06-14-2012 08:40 AM by Gigaherx. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 02-28-2011 02:54 PM

    Emailing Alternate View

    I have created a form where upon clicking a submit button the form switches views and then is submited via email.  The alternate form is a text only version that allows employees to view the form data on their phones.  The actual form is attached and can be filled out at a later time. 

    The issues is when they receave the form the view is blank.  

    This seems to be a "feature" of infopath.  When you create a rule that switches views and then submits the form, Infopath dosn't have enough time to switch the view befor submitting it.  So it ends up sending a blank view in the body of the email.  Microsoft is aware of this issue but considers it a feature NOT a bug. 

    Has anyone figured out a way around this "feature"?

    Thanks,

    Steven 

     

     

     

     

     

     

  • 03-01-2011 06:04 AM In reply to

    Re: Emailing Alternate View

    Ah yes, classic problem in InfoPath. My advice: instead of creating an email view, create an email section. So your form ends up having two sections:

    1. A section for "filling out" the form

    2. A section for emailing

    When the user clicks the button, instead of switching to the other view you simply change the value of a boolean field (from 0 to 1) and use this value in conditional formatting to hide the "filling out" section and display the email section, then send the email.

    Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-01-2011 10:47 AM In reply to

    Re: Emailing Alternate View

    Ernesto,

    Thanks for the responce.  That was the first thing I tried but that problem with that solution is that it's double work.  You end up having to create double the amount of fields.  One set of fields for the form view and one sent of fields for the email view.  With some forms that just way to much extra work. 

    But thank you any way for trying to help :)

    Steven

     

     

     

     

  • 03-01-2011 02:12 PM In reply to

    Re: Emailing Alternate View

    Actually, I usually just copy everything already on the form and paste it into my new section -- And you don't have to create any additional fields, just additional controls bound to the fields you've already got...

    I guess I don't see how this is any more effort than a new view?

    Hilary Stoupa

  • 03-01-2011 02:31 PM In reply to

    Re: Emailing Alternate View

    I thought, and please feel free to corect me, that you could only bind a singl control to a single field.  You could not have two controles pointing to the same field?

  • 03-01-2011 02:45 PM In reply to

    Re: Emailing Alternate View

    This is one of the beautiful things about InfoPath. The data source and controls are somewhat separate.

    You can bind as many controls as you need to a single field. If they are in the same view, you'll see a little blue "i" on the control, letting you know you have multiple controls bound to the same field, but that is just an informational message, which you can choose to ignore (as I do).

    You can also use expression boxes (calculated values in IP 2010) that display the value of a field (useful for an email section, where you won't be displaying data for users to change....)

    You can try this by selecting a field in your main data source, and dragging it onto your form a few times. Preview, and when you fill out the first instance, all your instances will get filled out... Fun! :-}

    Hilary Stoupa

  • 03-01-2011 03:03 PM In reply to

    Re: Emailing Alternate View

    Hilary, 

    I just tried a little test and it works wonderfuly.  Thank you very much for your time and input on this. 

    Do you happen to know why Infopath was designed like this though.  It seems that my original way of doing this, by having two views and switching the views on email submit would have been a much simpler solution.

     

  • 03-01-2011 03:23 PM In reply to

    Re: Emailing Alternate View

    Oh, you won't find too many people who'll disagree with you on that -- it does seem like it would make more sense to be able to just view switch (certainly easier on the designer, I'd much rather work on several views than have a long long single view to deal with). To my knowledge, the issue is actually one of rendering order -- the email is sent prior to the view being rendered (even though it doesn't look like that to the user). But, like Ernesto said, we just work around it...

    Hilary Stoupa

  • 01-20-2012 07:02 AM In reply to

    Re: Emailing Alternate View

    This is a very helpful thread; I successfully converted my two-view form (a user view and a recipient view) to a two-section form (user-viewable section and recipient-viewable section) using the advice above. One problem: what happens if the user clicks 'Cancel' after they've started the submittal process? As things stand in my form, the user ends up stranded in the 'recipient-viewable' section, with no way of getting back to the 'user-viewable' section they left behind. Any ideas?
  • 01-20-2012 08:52 AM In reply to

    Re: Emailing Alternate View

    Yup, that's a pitfall for this. Off hand, the only thing I can think of is some kind of hidden button and then just train the users - have a button on the form that is basically invisible (upper left corner or something) that they can click in this instance. There really is no good UI way to handle the cancelling of an email submit.

    Hilary Stoupa

  • 06-14-2012 08:40 AM In reply to

    Re: Emailing Alternate View

    I understand the workaround (=sections) concept - but ...

    My set-up basically looks like this: I have a single user completing a survey (Views 1-3). While user is completing survey, data is used to prepare several evaluation sheets (for different groups in our org) - say view 4-10.When user submits the survey,I want to send those individual views 4-10 to separate groups (so they see their part in their email). It is important that each group has it's own view, as they are required to work within that view (meaning they can open the form and switch to their view easily)

    So from this thread I learned that email goes before page is rendered and that this is a feature rather than a bug :-)

    Are there other workarounds available? Can I force render, add a timer, set a pseudo-value by rule or something else?

    InfoPath 2010 / SharePoint 2010
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.