header not Updating

st0328st0328 Member Posts: 97
Hi all,

I am checking for the condition, in the line table and Modifying Header Field in the Line table. But, after i pressed TAB is not showing the updated. Then I checked through debugging, then i can see that value is modifying in the header Table.

After several tests, I understood that, after modification if i select header form then it showing the value.

can someone give me Idea. to resolve this issue.

Comments

  • SavatageSavatage Member Posts: 7,142
    Search the forum for "Update Main form from Subform"
    search.php
  • st0328st0328 Member Posts: 97
    ThanQ :D Savatage,

    Actually, I am searching for this link. But i am using the wrong words.

    thanks a lot.
  • krikikriki Member, Moderator Posts: 9,110
    But the better advice is: DO NOT DO IT! You will create an upgrade nightmare.

    If you really need some total, best is to put in in the subform. This you can update as you want.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • st0328st0328 Member Posts: 97
    Actually,

    my requirement is like,

    if i have 4 lines in the Subform,.

    Ex :-

    the field TestLine is of Integer Type. The same field i have in TestHeader table also.

    Subform Line like,

    1) testLine = 1

    2) testLine =2

    3) testLine = 2

    4) testLine = 2

    In the Subform, the fields testLine has different values for the each line If i tried to change the first line value to 2, then my header table field--> testHeader should get Updated with 2.

    Suppose, if i change the 3 line to 1, then my Header table field-->Testheader should get empty.

    I wrote Code on Onvalidate trigger of TestLine Field. When i checked through Debugging it is updating. But, when running it is not.
  • krzychub83krzychub83 Member Posts: 120
    Listen to Kriki. This is a bad idea... Do not do it.

    You can:
    1. Make validation before post or any other function (where this check is required).

    Bad ideas:
    2. You can use FlowFields. Set Testheader class parameter to FlowField. Set its CalcFormula parameter to get MIN value from testLine column. Header is updating while You set focuse back on it.
    3. You can set timer at header and then check the subform status by its global function. Painfull while debuging.
    4. You can check line status at the header form’s trigger: ‘Form - OnActivateForm()’
    5. ... as many solutions as many developers You know.

    Do not use the trigger OnValidate at document lines. It is possible, but bad.
    Still No. 1 is the best. Look on the forum for details…
  • krikikriki Member, Moderator Posts: 9,110
    The best way is to put that header record on your subform and update it there.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.