Kullanıcı Kılavuzu

Divide

Divide

Kuika's Divide action is used to perform the division of two numeric values. It is ideal for in-app calculations, such as proportioning, unit value calculation. It can be used during user interface design actions or background calculations. It is especially preferred in scenarios such as financial reporting, inventory control, user-based analysis.

Technical Specifications

  • Divide Action (Arithmetic Panel): The Divide action produces a mathematical result by dividing one numeric value (Value) by another numeric value (Value2). Both values can be defined statically or dynamically.
  • Data Source Compatibility: Usually defined using data sources such as Action Result, Current, Form Component, Screen Input or Fixed and can be linked via Symbol Picker.
  • Web & Mobile Support: The action works seamlessly on both web and mobile apps.

Divide 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 screen for calculation.
  • Create a button (for example “Divide” or “Calculate Ratio”).
  • Select the button and add the Arithmetic > Divide action by specifying the appropriate trigger event (Initial Actions, OnClick, etc.) from the + ADD ACTION menu.

2. Configure Action Parameters

  • Value (Decimal - mandatory): The main numeric value for the division operation.
    • 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): The second value is the divisor.
  • 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.

Value2 field should not be entered as “0”. Since division by 0 is mathematically invalid, the system may give an error.

Usage Scenario: Per Capita Budget Calculation

In a human resources application, we want to calculate the budget per person by dividing the total annual budget by the number of employees. This calculation can be done by pressing the “Calculate” button after the user fills out a form.

Application Steps:

  1. Switch to the UI Design module.
  2. Through a Form component:
    • “Total Budget” (Value)
    • Create the “Number of Employees” (Value2) fields.
  1. Then add a button. From the Properties panel, name the button as “Calculate”.
  2. From the + ADD ACTION menu to run when this button is clicked:
    • OnClick → Arithmetic → Divide action.

Configuring the Divide Action:

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

The result can then be displayed in another component (for example a Label or Text component).

Divide Action Advanced Customizations

Calculation with Dynamic Values

  • Using Symbol Picker, the values to be divided can be retrieved from the system.
  • Calculations can be made conditionally according to the data selected by the user.
  • Example: When the user selects different year or department data with filtering, the system can take different budget values and divide them accordingly.

Transferring the Calculated Result to Another Action

  • The result of the Divide action can be used in another action.
  • For example: The calculated value can be printed to another form field or saved to the database with a “Set Value” action.

Conditional Calculation and Error Checking

  • If Value2 = 0, an error message can be displayed or the operation can be canceled.
  • For this, control can be made with “Add Condition” from the three points next to the system action.

Technical Risks and Controls

  • Divide by Zero Value: Value2 parameter must not be “0”. The system may error.
  • Type Mismatches: Both parameters must be numeric (decimal/integer). Otherwise the operation may fail.
  • Result Format: The result after division may be decimalized; therefore, proper formatting must be done (e.g. comma/quadrature delimitation).

The Divide action is a powerful tool that facilitates data-driven calculations and offers operational flexibility on the Kuika platform. It works seamlessly on web and mobile, can be fed from different data sources and can be integrated with other actions, making it an ideal solution for dynamic calculations in applications.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar