1

I've been cautioned by the powers to try before asking...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. The first 7 will always have data; the other 10 may or may not. I've not been successful in creating a variable that will look for text in lines 8 - 17, and either display or eliminate fields these fields from the email based on the presence of text or not. Suggestions?

  • A little more information would be useful. Is the 17 lines of data you are referring to being pulled in from SharePoint fields, or a variable you've created? – Jenny Hersko Dec 23 '16 at 19:15
  • 1
    The data comes from a SP list created from fields on an InfoPath form. I attempted the following variable in my email: If Current Item: Def Q 1 equals 'is not empty' Set Variable: DefQ1 to Current Item: Def Q 1. I replicated this for lines 8-10, then uploaded a form. The labels (created in the workflow email), with nothing adjacent still appeared. My desire is to have no data appear where the InfoPath form field is blank. – Curtis Dec 23 '16 at 20:17
1

My apologies, I don’t understand the issue. Regarding the workflow, to display source data fields of list items in a Designer workflow, I just click “Add or Change lookup” and select as many fields as I want to display in the email body. If a field is empty, the email body leaves it out automatically.

In InfoPath, I use rules that utilize conditional formatting to show/hide fields based on other field entries (if field A equals ”Yes” show field B).

  • Ok, then I think my problem my be that in the email I am manually adding – Curtis Dec 23 '16 at 21:01
  • Ok, then I think my problem my be that in the workflow email I am 'manually' adding placeholder labels. This may be an issue of my own creation. I will remove these labels and initiate another email to see what I get. – Curtis Dec 23 '16 at 21:04
  • 1
    I hope that resolves the issue. If it does, hop back on here and up vote my answer so I know it worked. ;) – Jenny Hersko Dec 23 '16 at 21:10
  • I think I just 'up voted' your answer. One follow up; if I wanted labels in the email, such as Def No 1, Def Quest 1, Def Comment 1; but, I only wanted the labels to appear if the associated field in the SP list had data in it, is this possible. As newly configured the email just has lines of text with no delineator. – Curtis Dec 23 '16 at 21:35
  • Unfortunately, I do not know how to add text to the email body and have it appear only if the field is not empty. As a workaround, in the body could you link to the list form’s current item? If you set the conditional formatting up in InfoPath, when the display form launches it will display as you describe. – Jenny Hersko Dec 23 '16 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.