3 Replies Latest reply: Jun 25, 2013 3:29 PM by Michael Solomovich RSS

    pick function + concatinate to field object

    Mario Van De Walle

      Hi,

       

      Is there a way to make this a one liner instead of rerwite this 12 times?

       

       

      pick

      ([COST Claim Repair Age Year]
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year1] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year2] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year3] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year4] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year5] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year6] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year7] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year8] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year9] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year10] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year11] ), [COST Claim Repair Age Year])
      ,
      aggr(NODISTINCT sum( {$<[COST Main Operation No1]={"*"}, [COST Main Operation No2]={"*"}, [COST Main Operation No3]={"*"}, [COST Main Operation No]={"*"} >} [CONTRACT Main Contract In Year12] ), [COST Claim Repair Age Year]

      )
      )