AnsweredAssumed Answered

Multiplying by 0

Question asked by Kirk_1 on Sep 18, 2012
Latest reply on Sep 19, 2012 by JimMac

Title

Multiplying by 0

Post

     I have the following set variable script. The value of $setclassmultiplier is derived from a found set. There are occasions where the fields value in the found set is 0.

     In later part of the script, i need to multiply the value of $setclassmultiplier to another value. 

     If the value is 0, that won't work.

     I tried adding the statement... & Case (  $setclassmultiplier  = 0 ; 1 ) to the bottom but when the value is 0 it does  not change it to a 1.

     Why?

     Is it because it does not know its 0 until after the script has run? If so can i do another set variable under it with the case statement and will that work?

      

     SetVarable [$setclassmultiplier ; value...

     Case (
         Rate Calculation::Classfromquote =50 ; Rate Calculation::Class50  ;
         Rate Calculation::Classfromquote =55 ; Rate Calculation::Class55 ;
                     Rate Calculation::Classfromquote = 60 ; Rate Calculation::Class60 ;
         Rate Calculation::Classfromquote = 65 ; Rate Calculation::Class65  ;
                     Rate Calculation::Classfromquote =70 ; Rate Calculation::Class70 ;
         Rate Calculation::Classfromquote = 77 ; Rate Calculation::Class77 ;
                     Rate Calculation::Classfromquote = 85 ; Rate Calculation::Class85 ;
         Rate Calculation::Classfromquote = 92 ; Rate Calculation::Class92 ;                 
         Rate Calculation::Classfromquote = 100 ; Rate Calculation::Class100 ;
         Rate Calculation::Classfromquote = 110 ; Rate Calculation::Class110 ;
                     Rate Calculation::Classfromquote = 125 ; Rate Calculation::Class125 ;
         Rate Calculation::Classfromquote = 150 ; Rate Calculation::Class150 ;
                     Rate Calculation::Classfromquote = 175 ; Rate Calculation::Class175 ;
         Rate Calculation::Classfromquote = 200 ; Rate Calculation::Class200 ;
                     Rate Calculation::Classfromquote = 225 ; Rate Calculation::Class225 ;
         Rate Calculation::Classfromquote = 250 ; Rate Calculation::Class250 ;
                     Rate Calculation::Classfromquote = 300 ; Rate Calculation::Class300 ;
         Rate Calculation::Classfromquote = 400 ; Rate Calculation::Class400 ;                 
         Rate Calculation::Classfromquote = 500 ;Rate Calculation::Class500 ;
         

     )


     &
     Case (  $setclassmultiplier  = 0 ; 1 )

Outcomes