Create Attribute

Create Attribute

Kuika's Create Attribute action is used to define a new attribute within the EAV (Entity-Attribute-Value) data model. This action makes it easy to extend dynamic data structures. It is ideal for forms that require user-defined fields, flexible data entry, and customizable content systems.

This action is currently available in Beta and is still under development. It is recommended to test it thoroughly before using it in a production environment.

Technical Specifications

  • Attribute Definition (EAV Panel): The Create Attribute action works with the following parameters to create a new attribute:
    • Name (String - Required): The name of the attribute to be defined in the system. It must be unique.
    • DataType (String - Required): The data type to be used for the attribute. Can take values such as String, Integer, Decimal, Boolean, Date.
    • Description (String - Optional): Descriptive information about the attribute. Used to provide information to the user or developer.
    • CategoryId (Guid - Optional): The ID of the category to which the attribute belongs. Categories can be used to group attributes.
    • IsRequired (Boolean - Optional): Indicates whether the attribute is required or not.
    • DefaultValue (Any - Optional): The default value of the attribute.
  • Data Source Compatibility: Parameters can be dynamically or statically determined from sources such as Screen Input, Fixed, Form Component, Current, and Action Result via the Symbol Picker in Kuika.
  • Web & Mobile Support: The Create Attribute action can be used in both web and mobile application scenarios.
Create Attribute Action Application Steps

1. Defining the Action in UI Design

  • Open your project on the Kuika platform.
  • Go to the UI Design module.
  • Select the screen where you want to create a new attribute.
  • For example, create a button named “Create Field.”
  • To make it work when clicked: + ADD ACTION > OnClick > EAV > Attribute > Create Attribute action.

2. Configure Action Parameters

Action parameters can be defined dynamically or statically using the Symbol Picker tool. Below are example definition methods and usage purposes for each parameter:

  • Name (Required):The text field where the user enters the attribute name via the form.
    • Symbol Picker > Form Component > Text Input
    • Example: “reference_number”
  • DataType (Required): This parameter determines the data type of the attribute. It must be assigned as a fixed value.
    • Symbol Picker > Fixed > “String” (or “Integer,” “Decimal,” “Boolean,” etc., depending on supported data types)
    • Example: “Integer”
  • Description (Optional): Text field where the user can enter a description of the attribute.
    • Symbol Picker > Form Component > Text Input
    • Example: “Specifies the reference number of the person”
  • CategoryId (Optional): The category ID to which the attribute belongs can be a fixed value or the user can make a selection.
    • Symbol Picker > Fixed > Guid or Symbol Picker > Component > SelectBox
    • Example: “cd253d3b-6a9a-48d2-afe7-e8303f2e9094”
  • IsRequired (Optional): This field determines whether the attribute is required.
    • It can be set to true/false or the user can select it with a key.
    • Symbol Picker > Fixed > true/false or Component > Switch
    • Example: true
  • DefaultValue (Optional): The default value of the attribute. It can be assigned a fixed value or obtained from user input.
    • Symbol Picker > Fixed or Component > Text/Number Input
    • Example: 0 (for Integer) or “Unknown” (for String)

3. Creating the Attribute on the System

Based on the defined parameters, a new attribute record is created in the system. This process enables customized data entry without modifying the database schema.

Usage Scenario: Defining Dynamic Form Fields

In a CRM application, users want to be able to define their own fields. For example, when the “Add New Field” button is clicked to create custom fields such as “Hobbies” or “Number of References,” this action can be triggered.

  • Name: ‘referans_sayisi’
  • DataType: “Integer”
  • IsRequired: true
  • DefaultValue: 0

In this way, user-specific, extensible data structures can be created.

Create Attribute Action Advanced Customizations
  • Conditional Creation: The attribute creation process can be made conditional based on specific user roles or screen statuses.
  • Validation: If an attribute with the same name already exists, the system can display an error message.
  • Automatic Category Assignment: CategoryId can be automatically determined according to specific screens.

Technical Risks

  • Repeated Names: Attributes should not be created with the same Name value. The system may encounter conflicts.
  • Invalid Data Type: Only data types supported by the system should be entered as DataType.
  • Missing Required Fields: The Name and DataType fields should not be left blank.
  • Beta Version Risk: The feature is still in beta; some behaviors may be unstable.

The Create Attribute action is an important component that enhances the dynamic data modeling capabilities of the Kuika platform. Although it is in beta, it provides a powerful foundation for flexible field management and customizable data collection needs in your applications.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar