Book a Demo

Author Topic: Code template - fiest line of operation notes  (Read 2746 times)

KooT

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Code template - fiest line of operation notes
« on: February 12, 2010, 09:35:29 pm »
Hello,
im trying to write my code teplate.
I need to get from 'Operation Notes' only first line.
Now i got there (from python template):

%PI=""%
%if genOptGenComments != "T"%
%endTemplate%
$notes = %REPLACE(opNotes, "\n", "\n    ")%
%if $notes != ""%
$notes = %WRAP_COMMENT($notes, genOptWrapComment, "", "")%
%TRIM($notes)%\n
%endIf%


How i can get only first line (to first \n) ?


Thanks for help!

KooT

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Code template - fiest line of operation notes
« Reply #1 on: February 12, 2010, 09:43:15 pm »
I got it...


$pos = %FIND(opNotes, "\n")%
$notes = %LEFT(opNotes,$pos)%

:)