Announcement

Collapse
No announcement yet.

NAB: force a refresh or event after editing a cell in a grid

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NAB: force a refresh or event after editing a cell in a grid

    i've made an app to process incoming EDI data that need manual attention

    Basically new edi situation is compared agains the current call-off situation already in the system.

    that comparison is generated in a workfile, .

    currently user can change manually the qty in transit, and when clicking on the grid-row, it already regenerates/refreshes the comparison workfile

    What i would prefer to do is the launch that refresh immediately after the user has changed the qty in transit

    i know at widget level that it is possible to have an app variable for refreshing the data, however my problem is that i nowhere can set this app variable


    is that do-able - or how can this be forced..

    i've added some screenshot that hopefullt will make more clearer of what i'm trying to achieve. Image 009.pngImage 010.pngImage 011.png

  • #2
    Currently the "Edit Record" row is only there to allow for setting a feature name. For now, you can add a validation (EXNABVAL based) program to your edit grid. Then you can add code in the ProcessEdit procedure to either set an app variable or set the refresh property:

    Code:
    SetResponse('success':'true');
    
    SetResponse('refresh':'true');
    == OR ==
    SetResponse('appVar':'myAppVar':'true');

    Comment


    • #3
      Actually maybe setting an app variable is your best route here. I believe we ignore the refresh if the grid is in cell editing.

      Comment


      • #4
        Hi Sean.


        Just tried it .. but .... i'm facing issues


        so i've made a program for validating the edit grid .
        in the processEdit i'm changing the value of the app variable that is used in my other grid widget

        PHP Code:
        dcl-proc ProcessEdit;
          
        dcl-pi *n;
          
        End-pi;

          If (
        IsChanged('DELFORWPF':'DWQTRAN'));
             
        SetResponse('appVar':'refreshEdi':'true');
          Endif;

        end-proc ProcessEdit
        • FIRST ISSUE

          When i change the value . i have the impression that the validation is working. however i would have expected that the window closes and control is return to the grid.


          in this case i first get and empty window with just an 'OK ' button
          and when clicking 'OK' , the edit windows remains
          (see print screens attached)

          Is there a way to close immediately the edit form window ?
        • SECOND ISSUE
          might be related to the isChanged Procedure i'm using ???

          When changing a value from 0 to whatever other value..
          the procedure launches.
          (also from any value to any other (non zero value)

          only when changing it back to 0.. nothing is happening..?

          can this be a bug? or am i doing somethin g wrong?
        • Image 012.png‚Äč Image 013.pngImage 014.pngImage 025.png
        Attached Files

        Comment


        • #5
          You must also return a success property. Add SetResponse('success':'true') within your if statement.

          Comment


          • #6
            Hi Sean

            perfect.. thx


            tried again.. (i had to use the processPostEdit instead of the ProcessEdit
            since for the recalculation i needed to have the updated values...


            now is working as i want ..

            thx again

            Comment

            Working...
            X