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.


Note: In an update (June 2017) we expanded the GoTo feature with the option to navigate back to the Root of the app. This is described in step 16. 


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 https://design.appmachine.com and log in;
  2. Open an existing app or create a new app;
  3. Click the "Add block" button;
  4. Select the "Pro" tab;
  5. Select the "Screen" block and click "Add block";
  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;

  8. Select the button you've just added to your screen by clicking on it;
  9. Change the name of the button to a recognizable name like 'btnShowMeMore';
  10. Enter a title / caption for the button: "Show me more";
  11. Now save your changes;
  12. Select the "Logic" tab;
  13. Click the "btnShowMeMore.Click" event;
  14. Click the "+" button;
  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;
  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. This can either be a block or the Root of your app. Selecting the Root will return the user to the home screen. 
  17. Click "Finish" and save the changes by clicking the "Save" button;


That's it, you're done! You just added a button with Logic linked to it to your app.