• 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.

Variable Data in App Header

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

  • Variable Data in App Header

    I have a timestamp stored in a data area. I've created a data source and KPI over that.
    image.png?
    I would like to have this information displayed on my app, which consists of a simple grid widget with a "sync" button. I would like the user to see the date/time the last sync occurred (stored in a data area).
    Rather than have a separate widget, I'd like to place that "value" either as button text or app bar title if possible. I thought about using an app variable linked to a hidden widget to do that, but wasn't sure how that might work.

    I'm trying to write a script to get the widget value and set the app variable.

    Looking for ideas.
    Last edited by gwilburn; 11-15-2024, 04:23 PM.

  • #2
    Is this KPI widget auto refreshing or just loaded when the application loads?

    Comment


    • #3
      It just loads when the application loads. I'll update the app variable when the user presses the button or refreshes the app.

      Comment


      • #4
        You could just have a startup program that sets an app variable with the initial value of lastSynced. Then, update the app variable when needed and link that app variable to a header, etc.

        Comment


        • #5
          Works for me - I'm actually using the app variable as the button text.

          Question: Since I'll be running the same RPG code at startup and after a button click, can you specify the button program (with an action) as the startup program?
          (I noticed the button program uses vvNabBtn while the startup uses vvNabTmpl)

          Comment


          • #6
            It is not designed to work that way but maybe worth a shot. I imagine you will get an error upon calling the program but I agree this would be nice to have the option. Let us know if you try it though.

            Comment


            • #7
              You are correct... got an API Encountered Error message.

              Not a big deal. I have it working
              image.png?

              Thanks for the help!!!

              Comment

              Working...
              X