0 Replies Latest reply: Feb 28, 2013 2:37 PM by Dominique Horemans RSS

    Data reduction does not work, please advice

    Dominique Horemans

      Hi Guys,

       

      I am having problems when reducing data. It works for 2 fields except for the last one that I added.

      That field determines the document currency that corresponds with a user that is logged in.

      This field, DOCCURR, is loosely coupled in the datamodel and when a look at the values loaded (by looking at a LB of that field f.e. or when looking at the preview in table view) I can see that the correct value is loaded.

      My goal is then to capture the value of that field (with peek and select the first record in the table) and put it in a variable. This variable is then used as a selectionparameter for another field (using an action 'select in field' when opening a sheet). This all seems to work correctly... BUT...

       

      It goes wrong when using the peek function. The table DocumentCurrency (which is loaded in section application) does not reduce the data correctly. As mentioned above, when looking at a LB, it seems that I have only 1 record in the table.

      When using peek() for the first record, the first record of the source table of DocumentCurrency is taken (only 3 records in the source) and this is of course not always the correct value.

      A check on this is, is using the NoOfRows() function on the field DOCCURR of table DocumentCurrency: the returned value is 3 and not 1.

       

      If I test with another reduced data field, I can see that for this other field, only 1 record is returned after section application. I am expecting this behaviour for field DOCCURR as well.

       

      Please advice!

       

      Regards,

       

      Dominique.