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

Re: [NTB] Using IF..THEN in clips

Expand Messages
  • Don - HtmlFixIt.com
    ... Two lines thus: ^!If ^%shipping% = 1.00 Next ELSE Skip ^!InsertText You have selected to pick up the goods in person. There is a basic charge of 1.00
    Message 1 of 5 , Nov 13, 2007
    • 0 Attachment
      > Could anyone tell me how and where I could add a function into my clip
      > which in effect would do the following:
      > IF Postage=1.00 (i.e. not 8.40 or 6.00 which is the usual postage)
      > THEN
      > at position xxx add the line "You have selected to pick up the goods in
      > person. There is a basic charge of 1.00 SFr for packaging of pick-up
      > goods"
      >
      > It would need to insert this line at a certain part of the email reply,
      > so I would either have to add the if..then section to where it will go,
      > or have it jump to a marker, if you see what I mean.

      Two lines thus:
      ^!If "^%shipping%" = "1.00" Next ELSE Skip
      ^!InsertText You have selected to pick up the goods in person. There is
      a basic charge of 1.00 SFr for packaging of pick-up goods.

      This assumes that shipping is a variable
    • swisscatdk
      Sorry, I thought this worked before testing it thoroughly. It shows the You have selected to pick up.... line no matter how much the Postage is. Even when
      Message 2 of 5 , Nov 13, 2007
      • 0 Attachment
        Sorry, I thought this worked before testing it thoroughly.
        It shows the "You have selected to pick up...." line no matter how
        much the Postage is. Even when the Postage is a variable
        ("8.40", "6.00" or "1.00"). So I tested it with the Paypal
        calculation part. (If the calculated Paypal fee is higher than 4.00
        Fr then it has to add a line as well). It added the line no matter
        how much the Paypal was.

        This is how the items are calculated
        ^!Set %Ref%=^?[Ref Number and Name only=1]
        ^!Set %Concert%=^?[No of Tickets and Concert=1]
        ^!Set %Tix%=^?[Tickets value only=1]
        ^!Set %Porto%=^?[&Porto=8.40|6.00|1.00]
        ;following calculates Paypal fee
        Paypal fee corrected: CHF ^$Calc((^%Tix%+^%Porto%)*0.045;2)$

        Using "Porto" in the suggested if... line, it prints the line no
        matter how much it is.
        Should I put the Porto sums into " ", e.g. "8.40"|"6.00"|"1.00" or
        wouldn't that help ?


        --- In notetab@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:

        >
        > > Could anyone tell me how and where I could add a function into my
        clip
        > > which in effect would do the following:
        > > IF Postage=1.00 (i.e. not 8.40 or 6.00 which is the usual
        postage)
        > > THEN
        > > at position xxx add the line "You have selected to pick up the
        goods in
        > > person. There is a basic charge of 1.00 SFr for packaging of pick-
        up
        > > goods"
        > >
        > > It would need to insert this line at a certain part of the email
        reply,
        > > so I would either have to add the if..then section to where it
        will go,
        > > or have it jump to a marker, if you see what I mean.
        >
        > Two lines thus:
        > ^!If "^%shipping%" = "1.00" Next ELSE Skip
        > ^!InsertText You have selected to pick up the goods in person.
        There is
        > a basic charge of 1.00 SFr for packaging of pick-up goods.
        >
        > This assumes that shipping is a variable
        >
      • Don - HtmlFixIt.com
        ^!Set %Ref%=^?[Ref Number and Name only=1] ^!Set %Concert%=^?[No of Tickets and Concert=1] ^!Set %Tix%=^?[Tickets value only=1] ^!Set
        Message 3 of 5 , Nov 13, 2007
        • 0 Attachment
          ^!Set %Ref%=^?[Ref Number and Name only=1]
          ^!Set %Concert%=^?[No of Tickets and Concert=1]
          ^!Set %Tix%=^?[Tickets value only=1]
          ^!Set %Porto%=^?[&Porto=8.40|6.00|1.00]
          ;following calculates Paypal fee
          Paypal fee corrected: CHF ^$Calc((^%Tix%+^%Porto%)*0.045;2)$

          ^!If "^%Porto%" = "1.00" Next ELSE Skip_2
          ^!InsertText ^P^PYou have selected to pick up the goods in person.
          ^!InsertText There is a basic charge of 1.00 SFr for packaging of
          pick-up goods.^P^P
          ^!InsertText Did we skip the line above this time?


          Works fine for me.
          I put the inserttext on two lines so it hopefully won't wrap in email.
        • swisscatdk
          Greeeat ! That DOES work, many many thanks. Maybe I can use the basics of that to insert a line about the Paypal fee as well.. Super. Thankyou so much !
          Message 4 of 5 , Nov 15, 2007
          • 0 Attachment
            Greeeat ! That DOES work, many many thanks. Maybe I can use the basics
            of that to insert a line about the Paypal fee as well..
            Super. Thankyou so much !

            --- In notetab@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:

            >
            > ^!Set %Ref%=^?[Ref Number and Name only=1]
            > ^!Set %Concert%=^?[No of Tickets and Concert=1]
            > ^!Set %Tix%=^?[Tickets value only=1]
            > ^!Set %Porto%=^?[&Porto=8.40|6.00|1.00]
            > ;following calculates Paypal fee
            > Paypal fee corrected: CHF ^$Calc((^%Tix%+^%Porto%)*0.045;2)$
            >
            > ^!If "^%Porto%" = "1.00" Next ELSE Skip_2
            > ^!InsertText ^P^PYou have selected to pick up the goods in person.
            > ^!InsertText There is a basic charge of 1.00 SFr for packaging of
            > pick-up goods.^P^P
            > ^!InsertText Did we skip the line above this time?
            >
            >
            > Works fine for me.
            > I put the inserttext on two lines so it hopefully won't wrap in email.
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.