AppMachine Help Center

How can we help you?

Follow

Open another Block when the User clicks a Button

A lot of our users would like to add "custom" behavior to their apps therefore we've included something called Logic into our pro version. Logic will let you add custom behavior / logic to your app in using a really easy and visual designer.

In this how to we will guide your through the process of setting up a simple logic flow to navigate to another block inside your app when the user clicks a button.

Prerequisites

  • An AppMachine app with at least one building block;

How To

By following the steps below you are going to setup a simple logic flow that will open another block inside your app when the users clicks a button.

  1. Go to http://design.appmachine.com and log in;
  2. Open an existing app or create a new app;
  3. Click the "Add block" button;
    Schermafbeelding 2014-05-13 om 12.54.46.png
  4. Select the "Pro" tab;
    4Pro.png
  5. Select the "Screen" block and click "Add block";
    Schermafbeelding_2014-05-26_om_10.04.55.png
  6. Enter a name for your block and click "Finish";
  7. Once you've clicked Finish you will see the empty screen and our template / screen designer. Drag a button onto your screen;
    For more information about our template / screen designer please take a look at this article: How To - Design your screen with the layout editor
  8. Select the button you've just added to your screen by clicking on it;
    Schermafbeelding_2014-05-26_om_10.10.49.png
  9. Change the name of the button to a recognizable name like 'btnShowMeMore';
    Schermafbeelding_2014-05-26_om_10.12.00.png
  10. Enter a title / caption for the button: "Show me more";
    Schermafbeelding_2014-05-26_om_10.42.00.png
  11. Now save your changes;
  12. Select the "Logic" tab;
    Schermafbeelding_2014-05-26_om_10.44.59.png
  13. Click the "btnShowMeMore.Click" event;
    Schermafbeelding_2014-05-26_om_10.48.34.png
  14. Click the "+" button;
    Schermafbeelding_2014-05-26_om_10.49.16.png
  15. You will be prompted with our Logic wizard. This wizard contains all the logic actions we are providing, in this case we want to use the "GoTo" action, so click the "GoTo" action;
    Schermafbeelding_2014-05-26_om_10.51.05.png
  16. In the next step you can select the building block that should be opened when the users clicks your button. Select the building block you would like to open;
    Schermafbeelding_2014-05-26_om_10.53.08.png
  17. Click "Finish" and save the changes by clicking the "Save" button;
    Schermafbeelding_2014-05-26_om_10.54.33.png

That's it, you did just add your first custom logic to your app!

Was this article helpful?
2 out of 3 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Edwin

    How can I add an event has a button btnShowMeMore.Click generated Web services -> HTML

  • Avatar
    harrywildeboer

    When using a web service. The button will show depending on the content of a web service: <button name = "products" value = "{data: products}" height = "55" font size = "18" ​​Margin = "5" halign = "left" background image = "75062954-24c4-425f-8203-771985fdd7fe" backgroundImagePressed = "8a39b426-e500-400e-a3d1-d2b3ffef5e22" visible = "AM: HasValue ([{data: products}])"> </ button>

  • Avatar
    Scott McCoy

    When I get to step 14, I get a blank screen. What's wrong?

Powered by Zendesk