• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

refreshing kpi's after selecting filter

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

  • refreshing kpi's after selecting filter


    I have an app below with 6 kpis and a grid with a filter. When I select from the filter only the grid gets refreshed. How do I also get the kpi's to refresh ?


    p1.png

  • #2
    I am using the EXNABFLT program as well.

    Comment


    • #3
      If you want to refresh a KPI widget, simply create an app variable and link it to the widget's General > refresh. Then, when you want to refresh it, just set that app variable to true.

      Screenshot 2024-05-24 at 9.24.18 AM.png

      Comment


      • #4
        Sorry for the silly question...but where would I set the variable true....does it allow me to to do it in the Filter program that I attached to the filter.....SETVALUE ? Trying to find an example in the example program for Filter process.

        Comment


        • #5
          You can set an app variable in your RPG program, for example:

          Code:
          SetAppVar(variableName:value)

          Comment


          • #6
            Awesome, that was the missing link I needed. Thank you.

            Comment


            • #7
              I most likely have something off but can't seem to get it working,




              Here is the code from the filter program

              vvUtility_saveSessVar('ABSco':lco);
              vvUtility_saveSessVar('ABSdiv':ldiv);
              vvUtility_saveSessVar('E46DATE':ldate);
              vvUtility_saveSessVar('E46WH':lwh);

              SetAppVar('Refreshkpi':'true');

              vvOut_toJsonPair('success:true,refresh:true,');
              return;




              Here is where the app variable is defined in the app


              p2.png





              This is the link to the kpi (I have 6 of them so I did the same for all 6). But when I change the filter it does not reload the kpi's

              p3.png


              Comment


              • #8
                I have to assume it's because you're using vvOut_toJsonPair, and you shouldn't be. You should be using SetResponse. For example:

                Code:
                SetResponse('success':'true');

                Comment


                • #9

                  vvUtility_saveSessVar('ABSco':lco);
                  vvUtility_saveSessVar('ABSdiv':ldiv);
                  vvUtility_saveSessVar('E46DATE':ldate);
                  vvUtility_saveSessVar('E46WH':lwh);

                  SetAppVar('Refreshkpi':'true');
                  SetResponse('success':'true');

                  return;



                  But I get this error when I try to compile the filter program,


                  p4.png

                  Comment


                  • #10
                    What exact version of 6.2 are you running?

                    Comment


                    • #11
                      p5.png

                      Comment


                      • #12
                        So i figured it out.....the issue was the version of the nab program was running was from a previous release....I update the nab to the current exnabflt and it worked correctly.

                        Comment

                        Working...
                        X