SP Workflow Email Variable - InfoPath Dev
in

InfoPath Dev

SP Workflow Email Variable

Last post 12-23-2016 02:02 PM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 12-23-2016 10:06 AM

    SP Workflow Email Variable

    I've tried to resolve the following for two weeks; being ignorant to the ways of workflow, I've had no success. I've created a workflow email that returns 17 lines of data, based on entries in an InfoPath form. The first 7 lines will always have data, and should always appear in the email; the other 10 lines may or may not have data. I've not been successful in creating a variable that will look at the pre-determined form fields for text (lines 8 - 17), and either display or eliminate these fields from the email based on the presence or lack of text. Suggestions? Examples? Video link?
    Filed under:
  • 12-23-2016 10:13 AM In reply to

    Re: SP Workflow Email Variable

    It would be helpful to better understand what you mean by "lines of data" - are these individual promoted fields in the library? Each field determines a "line" and (for the optional items) whether the line appears?
    Hilary Stoupa

  • 12-23-2016 10:36 AM In reply to

    Re: SP Workflow Email Variable

    I just tried this and am attaching a screenshot I hope will help you. I created variables and for each one, checked to see if a field had a value prior to setting the variable to the value from the library. Then I created my email using the variables. In the sent emails (samples also in screenshot) if the variables were blank, they simply didn't take up a line in the email. It is pretty straightforward. Hopefully this helps.
    Hilary Stoupa

  • 12-23-2016 12:01 PM In reply to

    Re: SP Workflow Email Variable

    In my first attempted I uploaded a form, leaving lines 8 - 10 (the three Def No 1 lines), empty. Each possible deficiency has three lines (No., Question, Comment). To your earlier question, yes, each line represents and manually created label and a promoted field.

    I created the following variables, based on your example: 

     

    I got the following email. The email still included all 10 deficiency comment groups, plus the No. 1 'blank' Deficiency Question; which, to this point -  without the variable, didn't appear when blank - as can be seen with the only deficiency groups.

    My goal is to have all blank fields or their labels NOT appear in the email.

    A New REDW Employee Housing Annual Fire and Life Safety Inspection Report has been Uploaded -

    Park: REDW
    Site Name: (P228) Redwood National Park
    Location ID: 11131
    Location Description: Wolf Creek House / Lower, 5353
    Occupancy Type: Storage
    Tenant: NPS
    Inspector's Name: Curtis T
    Inspection Date: 12/12/2016 12:00:00 AM
    NPS Representative's Name: Curtis T
    Inspection Results: No Deficiencies Noted During Inspection.
    Deficiency No.: 
    Deficiency Question: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description: 
    Deficiency No.: 
    Deficiency Description:

     

     

        then Email (my email here)

     

     

     

     

    Filed under:
  • 12-23-2016 12:03 PM In reply to

     The image didn't appear in the last post. I've attached the variable and the email structure here.


    Filed under:
  • 12-23-2016 12:10 PM In reply to

    Re: SP Workflow Email Variable

    Use your formula to set the variable to the label & the field value. If you need to use two variables for each line so that your label can be bold, do that. I see you creating variables - I don't see you using them in your email. So - if q1 is not blank, set a variable for the label, and set a variable for the value. Use the variables in your email - they will be null if the condition isn't met.
    Hilary Stoupa

  • 12-23-2016 01:18 PM In reply to

    Re: SP Workflow Email Variable

     Manna just fell from the heavens; I realized the 'labels' were appearing - when the fields were blank - because I artificially created the labels within the workflow email. That works for the first 7 lines, because they will always have data. The rest of the email should only include the 'lookups', and where they are blank they will not appear!

    Filed under:
  • 12-23-2016 02:02 PM In reply to

    Re: SP Workflow Email Variable

    Yup, you got it. :)
    Hilary Stoupa

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