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

Re: [Clip] Problem with Masked Field

Expand Messages
  • Charles M. Raine
    Thanks to Sheri, Don + Harvey, I eventually discovered I had more than one problem with my Clip Wizard etc. etc. Here is the working version with better
    Message 1 of 5 , Apr 10 1:24 PM
      Thanks to Sheri, Don + Harvey, I eventually discovered I had more than one
      problem with my Clip Wizard etc. etc. Here is the working version with
      better comments. I have generally been able to solve my problems with
      masked fields but this one got to me!

      H="Alf + Erika's Pensions"

      ^!ClearVariables
      ^!Set %date%=^$GetDate(yyyy)$
      ^!Set %pdate%=^?{(M="0000;1;*")Change Date as Required=^%date%};
      %pfrom%=^?{(H=2)Select For Whom==Alf|Erika};
      %xrate%=^?{(M="!0\.0000;1;*")Enter Exchange Rate as 1.5090}
      ;^!Info ^%pdate% ^%xrate% ^%pfrom%
      ;^!SetDebug on
      ^!Set %xrate%=^$Calc(^%xrate%+0;4)$
      ; Calculate Annual Pension in Euros for selected Person.
      ^!If ^%pfrom%="Alf" ^!Set %tpaid%=^$Calc(92.62*12;2)$
      ^!If ^%pfrom%="Erika" ^!Set %tpaid%=^$Calc(223.29*04;2)$

      ; Calculate total Canadian value after exchange.
      ^!Set %total%=^$Calc(^%tpaid%*^%xrate%;2)$
      ^!Info ^%pfrom% ^%pdate% ^%tpaid% X ^%xrate% = ^%total%
      ^!IfCancel CloseIt
      ^!Set %File%=^$GetDocumentPath$TaxLetter.txt
      ^!IfFileExist "^%File%" Next ELSE CloseIt
      ^!Open ^%File%
      ^!Jump Text_End
      ^!InsertText ^%pdate% ^%pfrom% ^%tpaid% ^%xrate% ^%total%^%NL%
      :CloseIt

      Charlie
      Charles M. Raine,
      Winnipeg. MB R3P 0W3
    Your message has been successfully submitted and would be delivered to recipients shortly.