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 a recent 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.
- An AppMachine app with at least one building block;
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.
- Go to http://design.appmachine.com and log in;
- Open an existing app or create a new app;
- Click the "Add block" button;
- Select the "Pro" tab;
- Select the "Screen" block and click "Add block";
- Enter a name for your block and click "Finish";
- 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
- Select the button you've just added to your screen by clicking on it;
- Change the name of the button to a recognizable name like 'btnShowMeMore';
- Enter a title / caption for the button: "Show me more";
- Now save your changes;
- Select the "Logic" tab;
- Click the "btnShowMeMore.Click" event;
- Click the "+" button;
- 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;
- 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.
- Click "Finish" and save the changes by clicking the "Save" button;
That's it, you just added your first custom logic to your app!