Eliminating Blank Fields from Email Workflow - InfoPath Dev
in

InfoPath Dev

Eliminating Blank Fields from Email Workflow

Last post 12-16-2016 09:43 AM by Hilary Stoupa. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 12-05-2016 06:29 PM

    Eliminating Blank Fields from Email Workflow

    I have created several InfoPath inspection forms. On each from the user has the ability to provide comment to up to 10 questions. There are seven (7) fields of general information data that always appears in every email. Below these seven lines the deficiency comments start. On the form the user has to enter the Question No (which correlates to the actual questions on the field inspection forms). Entering the Question No auto-populates the actual question in the Question Field. The user then has to enter the deficiency found and provide recommended correction actions. The email resembles the following:

    Park: 

    Site Name:

    Location ID:

    Location Name:

    (and three more lines of data)

    Question No.:

    Question Description:

    Question Deficiency:

    By default the above three lines are repeated 9 more times. It is these 10 lines that I need to influence. If no deficiencies are found, I would like for all of these lines to be left out of the email - rather than appearing, with no data along side. Only lines where data has been entered should appear in the email. 

    Filed under:
  • 12-08-2016 08:03 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    This email must be sent from the form, right? Not from a SharePoint Workflow?
    Hilary Stoupa

  • 12-15-2016 04:19 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    I currently have it set to send through a workflow. The workflow works fine, I just need a way of 'only' including fields with data in them; leaving all blank fields off the email.
  • 12-15-2016 04:29 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    I found this in my research. Is there a way to use this process to simply leave out all blank lines, rather than forcing predetermined text to be entered? https://wordimpress.com/sharepoint-workflow-remove-the-for-blank-values-in-email/
  • 12-15-2016 07:48 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

     So - that is similar to what I suggested at the end of your other thread where you mentioned this (http://www.infopathdev.com/forums/p/31893/108809.aspx#108809) - I think you should use a variable in your workflow to build the email body.

    Hilary Stoupa

  • 12-15-2016 08:11 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    Ok. Now, can you help me understand the construction? I am in receipt of the following suggestion. Does this look appropriate for what I am attempting? At the beginning of the workflow set variables to whether or not there are values in the 10 fields you want to control display of. Setting them to " " if you want to display them or "style="display:none;none;"" if you don't. variable1 = style="display:none;"
  • 12-15-2016 08:22 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    Sounds like it would be worth a try - I wouldn't know if it worked w/out trying it, but you may as well give it a shot. If your library / workflow are in production and you can't test on them, set up a simple test form / library / workflow.
    Hilary Stoupa

  • 12-15-2016 08:45 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    Ok, I'll give it a try. To the unresolved calculated field issue, I was sent the following; what do you think? "Assuming your goal is: If Today minus Date of Last Inspection is greater than 364, then the Status equals 'noncompliant', else Status equals 'Compliant... You should be able to use a calculated field. Create columns named 'Today', 'Date of Last Inspection', and 'Status'. Create a calculated field Status and set the formula to: =IF([Today]-Date of Last Inspection]>=364,"Noncompliant","Compliant") Then delete Today column. You'll have to recreate the fake column in the future if you want to change this formula."
  • 12-15-2016 08:57 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    Have you tried it? Again, if this is a production system where you are worried about making changes, set up a simple test list / library.
    Hilary Stoupa

  • 12-16-2016 09:33 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

     When I attempt what has been recommended I keep getting the same error message "Calculated columns cannot contain volatile functions like Today and Me." Any recommendations regarding whether this is even possible? If it is, how would you achieve?

  • 12-16-2016 09:43 AM In reply to

    Re: Eliminating Blank Fields from Email Workflow

    So you created a "Today" to use in your formula, and still get the error? My only suggestion was in your other post - use a workflow with a pause step.
    Hilary Stoupa

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