Loading ...
Sorry, an error occurred while loading the content.

19131Re: [Clip] best way to substitute a list of items

Expand Messages
  • Sheri
    May 1, 2009
      --- In ntb-clips@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
      >
      > ;assign event codes for hytek
      > ^!Set %current_event%=^$StrReplace(" Relay";"R";"^%current_event%";Yes;Yes)$
      > ^!Set %current_event%=^$StrReplace(" Run";"";"^%current_event%";Yes;Yes)$
      > ^!Set %current_event%=^$StrReplace(" Dash";"";"^%current_event%";Yes;Yes)$
      > ^!Set %current_event%=^$StrReplace(" LH";"H";"^%current_event%";Yes;Yes)$
      > ^!If "^%gender%" = "M" Next ELSE Skip
      > ^!Set %current_event%=^$StrReplace("100/110
      > HH";"110H";"^%current_event%";Yes;Yes)$
      > ^!Set %current_event%=^$StrReplace("100/110
      > HH";"100H";"^%current_event%";Yes;Yes)$
      >

      Such as you've shown it, you're replacing in an empty string ^%current_event%

      > better ideas?
      >
      > Don - HtmlFixIt.com wrote:
      > > I have a list of items that are track events:
      > > 3200 Relay
      > > 300 Hurdles
      > > 400 Run
      > > 100 Run
      > > 100/110 HH

      Is this one event or 5?

      > >
      > > When I actually use them I want them to read thus:
      > > 3200R
      > > 300H
      > > 400
      > > 100
      > > (this one is tricky)
      > > if ^%gender%=M then 110H
      > > but if ^%gender%=F then 100H

      Where did %gender% get set?

      I think you probably want to want to find a series of lines that represents a "gender event" and then do a series of replace-in-highlight on it. Then loop to do the next "gender event".

      Regards,
      Sheri
    • Show all 9 messages in this topic