5 Replies Latest reply: Aug 14, 2015 4:01 PM by Anil GORANTLA RSS

    How to pass all field values into variables.

    Anil GORANTLA

      Hi,

       

      I am trying to pass all field values into variables but after reload i am able to see only one value.

      DataToReduce:

      LOAD Item AS Item1,

           Status AS Status1,

           Store As Store1

      FROM

      Item.xlsx

      (ooxml, embedded labels, table is DataToReduce);

       

      let VNo.ofFields = NoOfFields('DataToReduce'); //To find No.of Fields in the table

       

       

      for i=0 to $(VNo.ofFields)-1   //

       

       

      let VFieldName=FieldName($(i),'DataToReduce'); //To find FieldName in the ith position.

       

       

      //let VNo.ofFieldValues=Count(Distinct $(VFieldName)); //To count noof distinct values of the field.

       

       

      let VNo.ofFieldValues=FieldValueCount('$(VFieldName)');

       

       

      for j=0 to $(VNo.ofFieldValues)-1 //

       

      // let VFieldvalue=FieldValue('$(VFieldName)',$(j)); 

       

       

      let VFieldvalue=peek('$(VFieldName)',$(j),'DataToReduce'); //To pass field value in jth position.

       

      next j;   //increment field value.

       

      next i;  //increment the fields.

       

      Can any one help on this issue.

       

      Thanks

      Anil