Update Information in a Screen

Update Information in a Screen

  

Hi Guys,


I have a screen with a label comming from a local text variable.

I need to update my variable without refreshing the screen and with the usage of a Rest API built in that app.

Is it possible? Can you help figure something to do this?


Cheers,

Nelson Mendes

Web or Mobile?  Web, I'm guessing.  How are you calling your REST API?

Hi Nelson,

Can you please explain more is it for Web or Mobile and please explain your use case.


Regards

-SK-

REST API build in the App sounds more like mobile, ifso just call the api and update the variable, with mobile you don't need an ajax refresh. But this only works if you have some kind of action going, if not you need an automatic refresh using javascript, look into the function "setInterval", you can use that to call a function automatically after a set period of time: var idleInterval = setInterval(timeraction, 60000); // 1 minute = 60000 after 60000 milliseconds this will call the function timeraction in which you can call a Action in which you can do the api call.

 

Hi Nelson,

On mobile (if that's what you're talking about), if you tie a variable to something on the screen, you cannot change the variable without updating the screen.

Hi Guys,


It's Web.


I have a dashboard with a button that calls one api. 

That response comes from another service with an exposed endpoint in my outsytems server and i need to update a local variavel in order to make the things on my screen visible.


Cheers,

Nelson

Make the button ajax submit, call the api, update the var, ajax update the container holding the var. 

But I have the idea you have made it much more complicated as this..