local variables

hi i am trying to save the value of "Account Balance" to calculate the dollar equivalent field. 

i wrote the code below and tried to save the value of "dollar equivalent" in a local variable but the value stays NULL, i also tried to replace with rule input but that did not work. 

any suggestions? 

     local!USD:ri!record['recordType!{e54cd4e6-9c62-49a2-82d6-965f3a86b2e7}SKJ Account.fields.{48c2c2cc-59fa-42cc-a496-c512f51c25bf}dollarEqu'],  
  local!USDBALANCE: ri!record['recordType!{e54cd4e6-9c62-49a2-82d6-965f3a86b2e7}SKJ Account.fields.{a26624aa-6c8b-4ad4-b696-f52169531873}accountBalance'],
    local!dollar:ri!record['recordType!{e54cd4e6-9c62-49a2-82d6-965f3a86b2e7}SKJ Account.fields.{48c2c2cc-59fa-42cc-a496-c512f51c25bf}dollarEqu'],  
     a!floatingPointField(
                      label: "Dollar Equ",
                      labelPosition: "ABOVE",
               
                      value: a!match(
                        value:local!Currencytype,

                        equals: 1,
                        then:{if(not(isnull(local!USDBALANCE)),(local!USDBALANCE/3.5),-1)},
                     
                        equals: 2,
                        then:{local!USDBALANCE},
                    
                        equals:null,
                        then:{false()},
                        default: then:{false()}

                      ),
                      
        saveInto:{local!dollar,a!save(local!USD,local!dollar)},

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data