22
Views
6
Comments
Update Information in a Screen
Question

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

UserImage.jpg
Davidk

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

2025-04-22 05-54-18
Shashi Kant Shukla

Hi Nelson,

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


Regards

-SK-

2011-06-15 10-51-19
Wim van den Brink

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.

 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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.

2016-02-19 12-35-00
Nelson Mendes

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

2011-06-15 10-51-19
Wim van den Brink

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.