How to add two numbers together

Hey All,

I am new to Appgyver and hope to be able to make some cool apps with it.

So here is what I am trying to do.

  1. click a button
  2. 2 numbers like 2 and 4 get added together
  3. the result of the above addition is displayed in a title or paragraph component

I realize I will need to convert the int/number to a string.
This seems like something that should be straight forward but I cannot seem to figure it out.
I my real problem is how to call a function on the button click.
Any suggestions would be great.

Thanks,
TT

So I was not able to solve the problem completely but this video helped.

Solved.

  1. If you don’t already have it create a test page with a ‘paragraph’ component and a ‘button’ component under it
  2. On this page switch from ‘View’ to ‘Variables’
  3. From the left side of the screen click ‘Page Variables’
  4. To the right click the ‘+’ next to ‘Add page variable’, name it what you want
  5. Further right, from the dropdown set the variable value type to ‘number’
    – this variable will be used to hold our result
  6. Switch back from ‘Variable’ to ‘View’ and save
  7. Select the ‘paragraph’ component
  8. To the right under Properties → Component select the ‘ABC’ box
  9. On the ‘Select Bindings Type’ screen select ‘Data and Variables’
  10. Next select ‘Page Variable’
  11. Select your page variable and click ‘Save’
    – You should be returned to you test page
  12. Click the ‘button’ component
  13. Open the ‘Show logic editor’ at bottom of screen
  14. To the left under the ‘Variables’ section, select and drag-n-drop the ‘Set page variable’ on to editor
  15. Link the ‘Tap’ component to this new ‘Set Page Variables’
  16. Click ‘Set page variable’ part
  17. Under Properties → Inputs → Assigned Values click the ‘123’ box
  18. On the ‘Select Bindings Type’ screen select ‘Formula’
  19. For this demo in the input field type RANDOM() then click ‘Save’
    – This way you see something different with every button click
  20. Save page
    Open app view in browser or Appgyver app on device(suggested) and click the ‘button’.
    The value should change with each click.
    Hope this helps.
    Thanks