We have an email that is sent at the completion of our workflow and within that email all of the values being used as Defaults are to be displayed. I am able to get all of the necessary information detailed in the email itself; however, I want each default value on its own line. The first two (Marital Status and Occupation) show on their own lines, but everything following Date Reported stays within the same line. I have included screenshots from the process and email that is received. Any recommendations?
The screenshot from the email shows all of the values. I’ll copy/paste here:
ECF ID: 2005119883
Defaults used:
Marital Status: Single
Occupation: Employee
Date Reported To Insurer: 09/02/2016 12:25 PM Clee Code: 00000 FingersToes Injured: 1 - index finger or first toe Lost Time from Work: No
I believe the boxes that are showing “on top” of the screenshot itself is reflecting the code you are looking for. So the first being: string.Concat(emailBody, item.Key.ToString + ": " + item.Value + Environment.NewLine)
Ideally, yes. That is what I would like the outcome to be, but the items following the Defaults Used: vary for each run. So that is why I have the For Each loop, to gather all of those details from the DefaultedFields that were specifically used for that item. I’m not understanding why it seems to work as the Marital Status and Occupation are part of the defaultedFields and are showing on their own lines. Everything following the Data Reported to Insurer winds up on the same line though.
It’s hard to figure out the issue here, but i think you just forgot to add “Environment.NewLine” somewhere… Try see each part of the code what shows, you might figure out what you missed !
I’ve been staring at it all day, inserting Environment.NewLine in other places, and also switched to html and tried with no success. Any chance that the date could be causing an issue? It only seems to break at that line.
I should add that if I insert another NewLine at the end it double spaces everything with no issue.
You are saying that after date you have and issue, what i suggest that you take off everything comes after date and newline after “date”, so that you see if it has something to do with that part of the code or what comes after
ECF ID: 2005119883
Defaults used:
Marital Status: Single
Occupation: Employee
Date Reported To Insurer: 09/02/2016 12:25 PM + Envirronment.NewLine + "TEST"