Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
Can you post an example of what your data looks like?
- ArchiveUser7 years agoQrew CaptainYes, here it is below. We want to view only the 2/3/2019 message.
05/04/2018 09:24:39 MST EP1RFCXP1 (EP1RFCXP1)
||elevation:5400|| INDIANA/91ST (WEST SIDE OF INDIANA) -ELEC SVC UG 1PH
120/240 GAS SVC - NO LOAD INFO PROVIDED WITH APPLICATION. CONTACT INFO:
JANE DOE 999-999-999 JEFFERSON CENTER METRO DISTRICT
ContactType: OWNR
ContactName: JEFFERSON CENTER METRO DISTRIC
TelephoneNumber: 999-999-999
PhoneNumberExtension:
Address: 1900 Misc street,LAKEWOOD,CO,80228-1814
01/31/2019 12:30:53 MST Kristi R Clark (230257)
design and project transferred to a new designer. waiting on customer verification for route.
2/3/2019 12:55:04 MST Krisit R Clark (230357)
Contacted customer and left Voice Message. - QuickBaseCoachD7 years agoQrew CaptainIs the delimiter (for humans) to decide when the next message starts that initial date field?
So in the text above there are three separate messages and you want just the last one, but any message can be any length? - ArchiveUser7 years agoQrew CaptainYes, that's correct. The field is free form that we pull from SAP and then we import that field from excel into Quickbase.
Several messages in that field and we want to just pull the last one. The message can be any length.
Thanks! - QuickBaseCoachD7 years agoQrew CaptainI�m sure it is possible and I will play with it over the next couple days as I have time. I�m sure we can hook onto those semicolons, walk backwards to the first; and then grab the rest of the date field.
- QuickBaseCoachD7 years agoQrew CaptainHere is a formula which seems to work. But it does make the assumption that the time stamps all the MST in them. Is that a valid assumption?
var text StepOne = SearchAndReplace([My text field],"MST","|");
var text Message = Right($StepOne,"|");
var text RestOfMessage = NotRight($StepOne,"|");
var text DateStamp = Right($RestOfMessage,"\n");
Trim($DateStamp & " MST " & $Message) - PhillipDennis7 years agoQrew CadetEven if they have other time zones, you could add variables to successively replace them all with the delimiter.
- QuickBaseCoachD7 years agoQrew CaptainGood point!
- ArchiveUser7 years agoQrew CaptainHi, Thank you for the code. We tried using this code and we get a formula error.
A formula may not contain a reference to itself directly or indirectly through another formula.
Here's the updated code I used.
var text StepOne = SearchAndReplace([Long Text Formula],"MST","|");
var text Message = Right($StepOne,"|");
var text RestOfMessage = NotRight($StepOne,"|");
var text DateStamp = Right($RestOfMessage,"\n");
Trim($DateStamp & " MST " & $Message)
Thanks! - QuickBaseCoachD7 years agoQrew CaptainI suspect that you need to change this
var text StepOne = SearchAndReplace([Long Text Formula],"MST","|");
to this
var text StepOne = SearchAndReplace([Long Text],"MST","|"); - ArchiveUser7 years agoQrew CaptainHi, It worked. Thank you so much!
I appreciate your time.