I prefer to use regex in these cases:
$ReplaceRegex("Call 123456, Rosenber........", /.*\s([0-9]+),.*/, "$1")
This will basically search for
and return the numbers as a capture group.
To test the function simply create a dummy Service Request with a text field and paste this function.
If you don't like it you can try to use find+substring as well.. ;-)
Thanks for your help so far.
I tried the find+Substing functions. I created a field at BO Journal.Email and a triggerd action in this BO. On insert this field will updated with the Call number. This works fine.
BUT: Now i need this number in the Incident. I created another triggerd action at Journal.Email on insert. Insert Child Object -> IncidentContainsJournal -> Incident-Field = $(Journal.Email-Field (call-number)).
If this action is active and i write an email with Call 445566 .... , Heat creates a new Incident. If it is not active then not, thats strange.
Thanks for ideas.
2 of 2 people found this helpful
The Regex way is cooler since it's more dynamic, but okay..
There are many different ways to get this number into your Incident..
One option (Needs to be extended to completely fit your needs, but as a hint):
1) add a field in the Journal#Email object: ContainsPACall (bool)
-> BeforeSave: $(nvl(PACallnumber,"") != "")
2) In the Incident object, add a relationship to Journal#Email (e.g. IncidentAssocPACalls)
Relation: RecId = ParentLink
3) Add a triggered Action in your Incident:
On Link: Journal#Email.IncidentAssocPACalls
-> Update Incident:
Set (PACallNumber) = $(if IsNull(PACallNumber) then [Journal#Email.IncidentAssocPACalls]PACallNumber) else PACallnumber)
The advantage of using a relationship in this case: You can add a child tab in the Incident layout and only show the communication with your partner.
Florian D. Get a BIG beer on me!!
I am blocked in something completely different, but when I want to reset my mind I come here and I read whatever I find interesting... You just gave me the hint I needed to solve my issue! (I didn't know about the "relationships to fields")
Thank you very much!
thanks for your help, I´ve followed all your steps, but I think, I am too stupid.
The field at Incident is empty again.
It is just a nice to have.
Thank you very much.