Kullanıcı Kılavuzu

Subtract

Subtract

Kuika's Subtract action is used to calculate the difference between two numeric values. It allows you to perform dynamic calculations within the application. For example, in an expense tracking application, you can automatically display the current remaining balance by subtracting the expenditure from the budget allocated for a specific item. Action is ideal for producing fast and practical results in data-driven calculation flows.

Technical Specifications

  • Subtraction: Calculates the result by subtracting the second value from the first value. This process can be done dynamically with form inputs from the user, existing data or previous action outputs.
  • Web & Mobile Support: The action works fully compatible with both web and mobile applications.

Subtract Action Implementation Steps

1. Defining Action in UI Design

  • Open your project on the Kuika platform.
  • Switch to the UI Design module and select the relevant screen.
  • Create a button (for example “Calculate Remaining Budget”).
  • Select the button and add the Arithmetic > Subtract action according to the desired trigger event (Initial Actions, OnClick, OnBlur, etc.) from the + ADD ACTION menu.

Configure Action Parameters

  • Value (Decimal - mandatory): The first numeric value to be subtracted. Data can be transferred to this field primarily from data sources such as Action Result. Other sources such as Method Input, Current, Screen Input, Fixed or Component can also be used. These categories can be defined by selecting them via Symbol Picker .
  • Value2 (Decimal - mandatory): This is the second value to be subtracted from the first value. Data can be imported into this field primarily from data sources such as Action Result. Other sources such as Method Input, Current, Screen Input, Fixed or Component can also be used. These categories can be defined by selecting them via Symbol Picker.

Utilization Scenario: Calculate Remaining Budget

After a user enters the total budget and expenditure for a particular event, the system automatically calculates the remaining budget and shows it to the user. This can be done with an action triggered by the user clicking on a button after filling out the form.

  1. Enter the UI Design module and select a Button element from the Elements panel on the left side.
  2. Add a field (for example a Label or another Text Input) where you will display the remaining amount.
  3. Select the button that will start the calculation and open the +ADD ACTION menu from the Properties panel.
  4. Select OnClick → Arithmetic → Subtract action.

Configuring the Subtract Action

  • Value: Symbol Picker > Components > Number Input
  • Value2: Symbol Picker > Components > Number Input

Result Usage (Optional)

You can show the calculated remaining budget in a field by adding a Set Value action immediately after the Subtract action:

  • Set Value → Target: remainingBudget field
  • Value: Result of the Subtract action

With this configuration, when the user enters the total budget and expenditure and clicks the "Calculate Remainder ” button, the remaining amount is calculated and displayed on the screen. This allows the user to instantly see the available balance to spend on the activity.

Subtract Action Advanced Customizations

  • Difference Calculation with Dynamic Inputs: The remaining amount specific to each category can be calculated by subtracting the user's expenditures in different categories.
  • Use in Chained Calculations:Subtract action can be used with other arithmetic actions (Sum, Multiply, Divide). For example: First all expenses are summed (Sum), then subtracted from the budget (Subtract).
  • Visualization of the Result: You can visually present the action result in a Label, Progress Bar or Chart component.

Technical Risks and Controls

  • Negative Value Risk: When Value2 is greater than Value, the result may be negative. A Condition action can be added to control this if necessary.
  • Empty or Invalid Inputs: Input validations should be added to prevent the user from entering missing or incorrect data.

Subtract action is one of the most frequently used actions in calculation based applications in Kuika platform. It can be used in many scenarios such as budget tracking and calculation of data differences. It adds dynamism to your application by producing powerful results with a simple mathematical operation.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar