| Author |
Message |
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 16/09/2011 08:49:56
|
scottybhoy
SysAider
Joined: 17/05/2010
Messages: 7
Offline
|
Hi
I have been customising our Email notification. We have two Custom fields and instead of the Email notification pulling in the values, I can only get the actual Key ID.
I have pasted the code below if anyone would be able to help and highlighted the line of code I am having trouble with. (Lines 4 & 20)
Also, on another note, when using HTML with the Email notifications, the PHP "IF" statements to hide items that have no entries, i.e. noted and attachments seem to cause a blank email to be generated, however, removing the PHP "IF" statement resolved this issue.
Any ideas on both issues:
1) Custom field Text Value in Email Notifications
2) "IF" PHP statement in HTML Emails
Any help appreciated.
<Current Email Notification Code Below>
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 17/09/2011 15:35:22
|
SylvainG
Elite SysAider
Joined: 26/04/2010
Messages: 117
Offline
|
Hi, how do you edit the email notification? Through the Customize / Customized Notifications or through another way?
Notifications have their own if/else scripted statements, not sure how it will handle scripted PHP code.
See http://www.ilient.com/help-page.htm?helpPageId=4250&edition=1&version=v8.1.02
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 19/09/2011 07:20:27
|
scottybhoy
SysAider
Joined: 17/05/2010
Messages: 7
Offline
|
Hi
I'm using the Customize>Notifications method to change the emails. Have the HTML working without the IF statements which will do I suppose
Only really need to know how to add the Custom field value to the notification instead of the KeyID showing. Any help on how to do that would be appreciated.
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 19/09/2011 11:04:32
|
SylvainG
Elite SysAider
Joined: 26/04/2010
Messages: 117
Offline
|
In line 3, you have (line 4 is just text so I'm assuming you meant line 3) :
<font face="Arial" size="+3" color="Black"><b>${sr.getAddonFieldValue("custList2")}</b></font>[/color]
and in line 20 you have :
<font face="Arial" size="-1" color="Black"><b>Preferred Contact Method</b> ${sr.custList1}</font>
Is this a typo? Shouldn't be '1' or '2' in both location?
This message was edited 1 time. Last update was at 19/09/2011 11:04:49
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 19/09/2011 11:14:23
|
scottybhoy
SysAider
Joined: 17/05/2010
Messages: 7
Offline
|
Ok, to confirm (as it looks as though I have made a typo with regards to the lines):
<font face="Arial" size="+3" color="Black"><b>${sr.getAddonFieldValue("custList2")}</b></font>[/color]
This line should show the Branch name of whoever submitted the ticket instead of the key value. We see the Key value instead of the Branch Name. I was trying different methods to pull in the text string, hence why the syntax is different on both lines, but none of them pull in the text string.
In this line:
<font face="Arial" size="-1" color="Black"><b>Preferred Contact Method</b> ${sr.custList1}</font>
this is the preferred contact method - we give them the choice of telephone or SysAid (Tel has the KeyID of 1 and SysAid has the KeyID of 2). The problem is, on this notification, instead of seeing "Telephone" or "SysAid" we see "1" or "2".
Ideally, both lines should show follow the same Syntax. I will upload latest code below. Hope I am not over complicating matters
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 19/09/2011 11:15:35
|
scottybhoy
SysAider
Joined: 17/05/2010
Messages: 7
Offline
|
<font face = Arial>
<font face="Arial Black" size="+3" color="Black"><b>${StatusNotification}</b></font><br>
<font face="Arial" size="+3" color="Black"><b>${CustList2}</b></font><font face="Arial" size="+0" color="Black"><b>Branch</b></font>
<br>
<font face="Arial" size="+3" color="Red">${Urgency}</font> <font face="Arial" size="+3" color="Red">${DueDate}</font>
<font face="Arial" size="+0" color="Red"><b>Requested Priority</b></font>
<br>
<font face="Arial" size="+3" color="Purple">${Priority}</font>
<font face="Arial" size="+0" color="Purple"><b>Resolution Expected</b></font>
<br>
<font face="Arial" size="+3" color="Black">${Status}</font>
<font face="Arial" size="+0" color="Black"><b>Current Status</font>
<br>
<font face="Arial" size="+3" color="Black">${AssignedTo}</font>
<font face="Arial" size="+0" color="Black"><b>Assigned Technician</b></font>
<br>
<font face="Arial" size="+0" color="Black"><b><u>Service Request Information</u></b></font>
<font face="Arial" size="-1" color="Black"><b>Requested By:</b>${RequestUser}</font>
<font face="Arial" size="-1" color="Black"><b>Preferred Contact Method:</b> ${sr.custList1}</font><font face="Arial" size="-1" color="Black"><b>Title:</b> ${Title}</font>
<font face="Arial" size="-1" color="Black"><b>Category:</b> ${Category} > ${SubCategory}</font>
<br>
<font face="Arial" size="+0" color="Black"><b><u>Problem Description</u></b></font>
<font face="Arial" size="-1" color="Black">${Description}</font>
<br>
<font face="Arial" size="+0" color="Black"><b><u>Notes</b></u></font>
<font face="Arial" size="-1" color="Purple">${Notes}</font>
<br>
<font face="Arial" size="+0" color="Black"><b><u>Solution</u></b></font>
<font face="Arial" size="-1" color="Green">${Solution}</font>
<br>
<font face="Arial" size="+0" color="Black"><b><u>Attached Files</u><b></font>
<font face="Arial" size="-1" color="Blue">${LinkToAttachments}</font>
<H2>Total Queued Requests: $Total_Active_Requests<H2>
This message was edited 1 time. Last update was at 19/09/2011 11:17:13
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 19/09/2011 13:14:10
|
SylvainG
Elite SysAider
Joined: 26/04/2010
Messages: 117
Offline
|
Sorry, that's all the help I can give. Open an incident with Ilient, they can probably help.
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 19/09/2011 13:20:02
|
scottybhoy
SysAider
Joined: 17/05/2010
Messages: 7
Offline
|
Thanks - no worries - at least you tried!
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 22/03/2012 19:12:29
|
SA Consultant
SysAider
Joined: 06/07/2009
Messages: 40
Location: Ecuador
Offline
|
I also have this issue with the custom fields created through Entities.
the code: ${sr.getAddonFieldValue("CustomColumn71sr")} shows the key and not the value.
Did anybody get a resolution??
|
|
|
![[Post New]](/Sysforums/templates/default/images/icon_minipost_new.gif) 26/03/2012 09:35:54
|
scottybhoy
SysAider
Joined: 17/05/2010
Messages: 7
Offline
|
remove the "sr." from the custom field and that should fix it - worked for me. Good Luck.
|
|
|