# How to update API without click?

**URL:** <https://forum.adalo.com/t/how-to-update-api-without-click/10190>\
**Category:** Database\
**Created:** [March 11, 2021, 11:57am UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190 "2021-03-11T11:57:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jenny/32/6858_2.png) [@jenny](https://forum.adalo.com/u/jenny)\
**Post date:** [March 11, 2021, 11:57am UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/1 "2021-03-11T11:57:29Z")

</div>

Hello everybody. I am creating an app with updated information on cryptocurrencies. I have successfully imported the data via API but the update, for example the Bitcoin price, takes place only via click … how can I do to have the price updated automatically without clicking?

---

<div class="post-metadata">

**Author:** ![Erik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erik/32/7849_2.png) [@Erik](https://forum.adalo.com/u/Erik)\
**Post date:** [March 11, 2021, 12:04pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/2 "2021-03-11T12:04:31Z")

</div>

Hi Jenny,

Welcome to the Adalo forum!

You could use the timer component! Have it countdown on the page on a set frequency to get your API updates.

---

<div class="post-metadata">

**Author:** ![montetennis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/montetennis/32/5904_2.png) [@montetennis](https://forum.adalo.com/u/montetennis)\
**Post date:** [March 11, 2021, 12:16pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/3 "2021-03-11T12:16:23Z")

</div>

Hey @Erik!  
I guess that’s partially solving the problem, I guess she wants to have the price updated in the same page, more than once…  
Here comes my solution, that builds on top of Erik…

Add another action to the countdown: go to screen “A”.  
In the screen “A” there is a action when you visit the screen: “go back”…

And you are in a beautiful loops where the speed is determined by the countdown, and the price keeps getting updated.

Might do a video on this, thanks for inspiration!

---

<div class="post-metadata">

**Author:** ![jenny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jenny/32/6858_2.png) [@jenny](https://forum.adalo.com/u/jenny)\
**Post date:** [March 11, 2021, 1:26pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/4 "2021-03-11T13:26:41Z")

</div>

thanks Erik and Montetennis… yes I tried, it works but the effect is not very pleasant because the user would see the “page reload”. I was thinking if there was a way to automatically reactivate the countdown on the same page … in this way if it would restart automatically I can apply an update action every time the cowntdown goes to zero … how can I reactivate it every time it goes to zero?

---

<div class="post-metadata">

**Author:** ![montetennis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/montetennis/32/5904_2.png) [@montetennis](https://forum.adalo.com/u/montetennis)\
**Post date:** [March 11, 2021, 1:28pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/5 "2021-03-11T13:28:48Z")

</div>

There is no way. However, be sure to set the blank screen which looks exactly equal to the current screen, and that the transition is none. The “page reload” will disappear.

---

<div class="post-metadata">

**Author:** ![Erik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erik/32/7849_2.png) [@Erik](https://forum.adalo.com/u/Erik)\
**Post date:** [March 11, 2021, 1:31pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/6 "2021-03-11T13:31:01Z")

</div>

@montetennis correct me if this wouldn’t work, but couldn’t you loop on the same screen with a change input, like below?

Haven’t tested it, but could work

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/2/25d59b81fb6fb61a60efebe037c201408c2fb56f.png)

---

<div class="post-metadata">

**Author:** ![montetennis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/montetennis/32/5904_2.png) [@montetennis](https://forum.adalo.com/u/montetennis)\
**Post date:** [March 11, 2021, 1:34pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/7 "2021-03-11T13:34:30Z")

</div>

@Erik This might work as well, and looks better.  
Honestly I don’t know if the “countdown ends action” is triggered only the first time it reaches 0, or can be resetted by adding seconds to the countdown…

@jenny try this and let us know if this works. 🙂

---

<div class="post-metadata">

**Author:** ![Erik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erik/32/7849_2.png) [@Erik](https://forum.adalo.com/u/Erik)\
**Post date:** [March 11, 2021, 1:38pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/8 "2021-03-11T13:38:34Z")

</div>

Doesn’t work.

Another idea is to go to a clear modal screen with an action to go back. User wouldn’t be able to use the screen for a second, but they wouldn’t see any transition and would “remain” on the same screen.

---

<div class="post-metadata">

**Author:** ![montetennis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/montetennis/32/5904_2.png) [@montetennis](https://forum.adalo.com/u/montetennis)\
**Post date:** [March 11, 2021, 1:39pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/9 "2021-03-11T13:39:32Z")

</div>

Thanks @jenny for this question…  
I guess @erik and I learnt a new trick here! 🙂

---

<div class="post-metadata">

**Author:** ![jenny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jenny/32/6858_2.png) [@jenny](https://forum.adalo.com/u/jenny)\
**Post date:** [March 12, 2021, 6:00am UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/10 "2021-03-12T06:00:13Z")

</div>

thanks to you for all the help now i’m working on “discounting a product for a period of time” but with your help i think i can. thank you again.

---

<div class="post-metadata">

**Author:** ![jenny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jenny/32/6858_2.png) [@jenny](https://forum.adalo.com/u/jenny)\
**Post date:** [March 12, 2021, 8:32am UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/11 "2021-03-12T08:32:14Z")

</div>

hi guys, as I told you a little while ago I’m trying to perform a price update on a product. This update will be a discount of 20% but only for 48 hours. I managed to do the whole procedure but if the user exits the page or logs out, the countdown does not continue. I cannot apply the cowntdown in the database so that even if the users log off, time continues to run. how to do?

---

<div class="post-metadata">

**Author:** ![montetennis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/montetennis/32/5904_2.png) [@montetennis](https://forum.adalo.com/u/montetennis)\
**Post date:** [March 12, 2021, 9:48am UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/12 "2021-03-12T09:48:28Z")

</div>

For that a countdown is not appropriate. You need to set a date field “discount end”, and when you were making the countdown start, this time you created this date to be equal to NOW + 2 (days).

Then you apply the discount based on the current time, and the time displayed in this field

---

<div class="post-metadata">

**Author:** ![jenny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jenny/32/6858_2.png) [@jenny](https://forum.adalo.com/u/jenny)\
**Post date:** [March 12, 2021, 12:00pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/14 "2021-03-12T12:00:58Z")

</div>

I’m trying, but your reasoning is not clear to me … can you show me some examples?

---

<div class="post-metadata">

**Author:** ![jenny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jenny/32/6858_2.png) [@jenny](https://forum.adalo.com/u/jenny)\
**Post date:** [March 13, 2021, 7:22pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/15 "2021-03-13T19:22:51Z")

</div>

hi @montetennis , I have tried various ways but I cannot apply this product price discount and reset factor. please can you show me the correct procedure. thank you

---

<div class="post-metadata">

**Author:** ![montetennis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/montetennis/32/5904_2.png) [@montetennis](https://forum.adalo.com/u/montetennis)\
**Post date:** [March 14, 2021, 6:02pm UTC](https://forum.adalo.com/t/how-to-update-api-without-click/10190/16 "2021-03-14T18:02:54Z")

</div>

@jenny I believe I might have to check your structure, and create an example on your application. Unfortunately this could require some time. Hopefully someone else can answer this question, or you can ask for professional help on the expert page!
