Skip to main content
Solved

Trying to calculate new stock value on button press

  • June 14, 2022
  • 4 replies
  • 34 views

Forum|alt.badge.img+9

Hello!

I am trying to achieve the following.

I would like to update my stock on button press by adding or removing the value given in the cell.

Please help.

Thank you very much in advance!!!

Best answer by TheTimeSavingCo

Hi Pim, I’ve put something together here for you that should do what you’re looking for

It would require that the button runs a Scripting App though, which forces the sidebar to appear

4 replies

Andy_Cloke
Forum|alt.badge.img+17
  • Known Participant
  • 91 replies
  • June 14, 2022

Hi Pim,

You could use the button to run a script that makes an API call (using fetch) to a financial API like AlphaVantage and updates your cell with the response.

If you’re happy using a third-party app you could follow this video to use the Data Fetcher app:

Then follow this guide to run the request when a button is pressed.


TheTimeSavingCo
Forum|alt.badge.img+31
  • Brainy
  • 6459 replies
  • Answer
  • June 15, 2022

Hi Pim, I’ve put something together here for you that should do what you’re looking for

It would require that the button runs a Scripting App though, which forces the sidebar to appear


Forum|alt.badge.img+9
  • Author
  • New Participant
  • 3 replies
  • June 15, 2022

Hi Pim, I’ve put something together here for you that should do what you’re looking for

It would require that the button runs a Scripting App though, which forces the sidebar to appear


Thank you very much!!! that was what I was looking for.


Forum|alt.badge.img+9
  • Author
  • New Participant
  • 3 replies
  • June 15, 2022

Hi Pim,

You could use the button to run a script that makes an API call (using fetch) to a financial API like AlphaVantage and updates your cell with the response.

If you’re happy using a third-party app you could follow this video to use the Data Fetcher app:

Then follow this guide to run the request when a button is pressed.


Thank you very much for the suggestion!! That is certainly something I will be looking into.