I'm using CR 2016 and trying to extract a portion of memo field {CHRT_Note.Note_RTF}. I need the portion of the field between the terms "Plan:" and "Charge Capture:". These terms are always present. Below are the formula fields I've created, with @Plan as the end result. @Plan works perfectly as long as the text between doesn't exceed the string limit, however, for longer sections of text, the field is truncated and doesn't return all the text. If I only use @Plan 2, then everything is returned, no matter how long it is.
Is there a way to split the longer sections or a better formula to accomplish the same overall goal of only returning the text between the two terms?
@Plan 2:
(mid({CHRT_Note.Note_RTF},instr({CHRT_Note.Note_RTF},"Plan:")+1,
(instr({CHRT_Note.Note_RTF},"Plan:"))-(instr({CHRT_Note.Note_RTF},"Plan:")-1000)))
@Text (used this formula to strip the html tags bc nothing happened when I changed the text interpretation for @Plan 2):
stringvar TempText := {@Plan 2};
TempText := Replace (TempText, '\plain\f0\fs20\cf0', " ") ;
TempText := Replace (TempText, '\par', " ") ;
TempText := Replace (TempText, '\ul', " ") ;
TempText := Replace (TempText, '\b', " ") ;
TempText := Replace (TempText, '\plain\f0\fs28\cf0', " ") ;
TempText := Replace (TempText, '}', " ") ;
TempText := Replace (TempText, '\n', " ") ;
TempText
@Plan:
extractstring({@Text},'lan:','charge capture:')
Is there a way to split the longer sections or a better formula to accomplish the same overall goal of only returning the text between the two terms?
@Plan 2:
(mid({CHRT_Note.Note_RTF},instr({CHRT_Note.Note_RTF},"Plan:")+1,
(instr({CHRT_Note.Note_RTF},"Plan:"))-(instr({CHRT_Note.Note_RTF},"Plan:")-1000)))
@Text (used this formula to strip the html tags bc nothing happened when I changed the text interpretation for @Plan 2):
stringvar TempText := {@Plan 2};
TempText := Replace (TempText, '\plain\f0\fs20\cf0', " ") ;
TempText := Replace (TempText, '\par', " ") ;
TempText := Replace (TempText, '\ul', " ") ;
TempText := Replace (TempText, '\b', " ") ;
TempText := Replace (TempText, '\plain\f0\fs28\cf0', " ") ;
TempText := Replace (TempText, '}', " ") ;
TempText := Replace (TempText, '\n', " ") ;
TempText
@Plan:
extractstring({@Text},'lan:','charge capture:')