Clappia supports all kinds of arithmetic operations and even logical operations like IF/ELSE. To use this block, you don’t need to learn any new language or syntax. Basic knowhow of an Excel sheet is sufficient to add arithmetic operations and IF/ELSE logic in a Clappia app. Here are the steps:
- Add a new app or Get into the edit mode of an existing application.
- Add few variable fields by dragging a “Text” block from right to the left section.
- Edit this field to a relevant variable of your choice.
- When you save the labels, you get a variable name in a bracket below the label. You need to use these values as variables in further calculations.
- Drag a formula block to the left section and edit it.
- Edit the label based on your requirement and add a formula using the variables generated above.
- Make sure the variables are matching exactly with the variables generated in above steps (including the case).
- Come out of the app edit mode by navigating to “My Apps” section and then to your app. Your app should show the desired calculation provided you enter all the values in the text fields.
If you want to add IF/ELSE logic to your app, use the variables generated above and use the syntax of Excel. In this case, we added a condition that if the total price comes lesser than 1000, charge 1000 else charge the calculated amount.