Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 16 to 18 of 18
01-06-2014, 08:23 PM #16
Why is it too complicated to just add in the function that I gave you???
But okay, we can hack it another way:
var str = email.body_text; var theMatch = str.match(/number\:\s+(\d+)$/i); var refStr = theMatch ? theMatch : "no valid number given"; externalReferenceNumberCreate(current.sys_id, 'Client reference number',refStr, 'Client number');Be yourself. No one else is as qualified.
Users who have thanked Old Pedant for this post:
01-07-2014, 02:37 AM #17
- Join Date
- May 2013
- Thanked 0 Times in 0 Posts
It's probably my lack of experience or that some suggestions don't work in the environment I'm working in; but your explanations are sometimes over my head/don't work as might be expected elsewhere. I'll work with what you've provided, and thanked you for your posts.
Last edited by narelle; 01-07-2014 at 02:50 AM.
01-07-2014, 07:34 PM #18
I think the major point you have been missing is that, if there is *NO MATCH*, then your code will just get either an error or a blank string.
My code, on the other hand, CHECKS for the missing number and supplies a message (which you can change to whatever you want) to say so.Be yourself. No one else is as qualified.