Refresh Form from an other form

LeoNavLeoNav Member Posts: 55
Hi, :D

I would like to refresh a form but from an other form. Is it possible ?
I know UPDATE exists but it works only from the current form.

Here is the situation :

I add some lines to a form from an other form with that code :

Cpt:=0;
CurrForm.SETSELECTIONFILTER(SelectionTest);

IF SelectionTest.FINDSET THEN
REPEAT
  Cpt:=Cpt+1;
 
  Table56204.INIT;
  Table56204."Qualification Code" :='oups';
  Table56204.Type := Table56204.Type::Job;
  Table56204.Code := SelectionTest."No.";
  Table56204.Name := SelectionTest.Description;
  Table56204.INSERT;

UNTIL SelectionTest.NEXT = 0;

I only want to refresh the form after the loop is finished. I precise that the loop works on an other form.

An idea ?

Answers

  • johannajohanna Member Posts: 369
    I think it's possible to refresh a form 'A' from other form 'B' :)
    You can try to make a function to refresh current form (with UPDATE syntax) in form 'A'. Then, from form B, you can call the function refresh in form A.. :)
    Best regards,

    Johanna
  • LeoNavLeoNav Member Posts: 55
    But in this case, the form B will uses the same code than the form A, what is exactly the same than typing directly the code on the button,no ?
  • johannajohanna Member Posts: 369
    If I don't misunderstanding what is your goal, I think that your codes above in form A are used to add some line in form B then you want to refresh form B.
    In form B add function Refresh with codes : CurrForm.UPDATE(FALSE);
    In form A after the loop is finished, add codes : FormB.Refresh;
    Best regards,

    Johanna
Sign In or Register to comment.