How can I pass a set of records in a Parameter???

xina_manxina_man Member Posts: 116
Hi!

Is it possible to pass a set of records in a parameter?
I have a form that call's a function and one of the parameters is a Record. I want to pass that record set into the function, but it doen't keep the filter... :(

I have Something Like This:
Rec.FINDSET;
Codeunit.Funcition(par1, par2, par3, REC);

When the function runs the:
IF REC.FINDFIRST THEN
   REPEAT
      ...
   UNTIL REC.NEXT=0
it repeats the cycle for every records on the table, and i just want to repeat it for the ones I've selected.

Can anyone help me with this?
Tanks in advance

Answers

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    When you have a filtered set of records just mark your record parameter as reference (tick column Var).
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • xina_manxina_man Member Posts: 116
    When you have a filtered set of records just mark your record parameter as reference (tick column Var).

    Thank You!!!

    Problem solved.
    I thought that I just needed to mark the Var column as TRUE, if i wanted to return the parameter after change it in the function!

    Thanks
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Yes, that's also right. In an easy way: If it's set to TRUE you will work with exactly the same variable that you defined on your form.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.