Lower case issue in inbound action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 10:09 PM
I have a "reply" inbound action for custom payroll table which treats "re:" emails as new if ticket number is provided in subject. We are not using watermark for this actions.
Whenever user send email with payroll ticket number in subject in lower case new ticket is not getting created but when sent in uppercase it creates.
like: if user send email with subject as in case 1 tickets are created but when he send as case 2, tickets are not getting created. No error in log file it just say "skipping as condition not met"
condition is : email.subject.toLowerCase().indexOf("pylt")>-1
I tried condition as below but nothing works:-
email.subject.toLowerCase().indexOf("pylt")>-1
email.subject.toUpperCase().indexOf("PYLT")>-1
email.subject.toLowerCase().indexOf("pylt")>-1 || email.subject.toUpperCase().indexOf("PYLT")>-1
case 1: "Issue in payroll wrt ticket number PYLT1000890. please resolve the issue"
case 2: "Issue in payroll wrt ticket number pylt1000890. please resolve the issue"
Where can be the issue
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 10:17 PM
Try typecasting the email.subject variable:
String(email.subject).toLowerCase().indexOf("pylt")>-1
//OR
String(email.subject).toUpperCase().indexOf("PYLT")>-1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 10:52 PM
Hi Hafsa,
Try replacing >=0 with -1 something as below
email.subject.toLowerCase().indexOf("text") >= 0
Thanks,
vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2019 12:36 AM
tried all below but not creating. When I give in uppercase then only it's creating case.
email.subject.toLowerCase().indexOf("pylt") >= 0
String(email.subject).toLowerCase().indexOf("pylt")>-1
//OR
String(email.subject).toUpperCase().indexOf("PYLT")>-1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2019 01:03 AM
check if is there any other condition